diff src/video/win32/SDL_gdirender.c @ 2919:2f91a3847ae8

Fixed compiling Windows renderers. Lines and points will be implemented later.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 25 Dec 2008 05:16:18 +0000
parents 9dde605c7540
children 27f2b5e7e899
line wrap: on
line diff
--- a/src/video/win32/SDL_gdirender.c	Thu Dec 25 05:11:29 2008 +0000
+++ b/src/video/win32/SDL_gdirender.c	Thu Dec 25 05:16:18 2008 +0000
@@ -55,8 +55,7 @@
                            const SDL_Rect * rect, int markDirty,
                            void **pixels, int *pitch);
 static void GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
-                          Uint8 a, const SDL_Rect * rect);
+static int GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
 static int GDI_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
                           const SDL_Rect * srcrect, const SDL_Rect * dstrect);
 static void GDI_RenderPresent(SDL_Renderer * renderer);
@@ -570,8 +569,7 @@
 }
 
 static int
-GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a,
-               const SDL_Rect * rect)
+GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
 {
     GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata;
     RECT rc;
@@ -588,7 +586,7 @@
     rc.bottom = rect->y + rect->h + 1;
 
     /* Should we cache the brushes? .. it looks like GDI does for us. :) */
-    brush = CreateSolidBrush(RGB(r, g, b));
+    brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b));
     SelectObject(data->current_hdc, brush);
     status = FillRect(data->current_hdc, &rc, brush);
     DeleteObject(brush);