Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Hey, those automated tests are coming in handy! Fixed GDI rendering s…
Browse files Browse the repository at this point in the history
…emantics
  • Loading branch information
slouken committed Dec 7, 2009
1 parent 45ad690 commit 56a5b64
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/video/win32/SDL_gdirender.c
Expand Up @@ -743,6 +743,10 @@ GDI_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
status = Polyline(data->current_hdc, points, 2);
DeleteObject(pen);

/* Need to close the endpoint of the line */
SetPixel(data->current_hdc, x2, y2,
RGB(renderer->r, renderer->g, renderer->b));

if (!status) {
WIN_SetError("FillRect()");
return -1;
Expand All @@ -764,8 +768,8 @@ GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)

rc.left = rect->x;
rc.top = rect->y;
rc.right = rect->x + rect->w + 1;
rc.bottom = rect->y + rect->h + 1;
rc.right = rect->x + rect->w;
rc.bottom = rect->y + rect->h;

/* Should we cache the brushes? .. it looks like GDI does for us. :) */
brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b));
Expand Down

0 comments on commit 56a5b64

Please sign in to comment.