Fixed compiling Windows renderers. Lines and points will be implemented later.
authorSam Lantinga <slouken@libsdl.org>
Thu, 25 Dec 2008 05:16:18 +0000
changeset 29192f91a3847ae8
parent 2918 bd518fc76f28
child 2920 cdb01906cb7e
Fixed compiling Windows renderers. Lines and points will be implemented later.
src/video/win32/SDL_d3drender.c
src/video/win32/SDL_gdirender.c
     1.1 --- a/src/video/win32/SDL_d3drender.c	Thu Dec 25 05:11:29 2008 +0000
     1.2 +++ b/src/video/win32/SDL_d3drender.c	Thu Dec 25 05:16:18 2008 +0000
     1.3 @@ -62,8 +62,7 @@
     1.4  static void D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
     1.5  static void D3D_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
     1.6                               int numrects, const SDL_Rect * rects);
     1.7 -static int D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
     1.8 -                          Uint8 a, const SDL_Rect * rect);
     1.9 +static int D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
    1.10  static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
    1.11                            const SDL_Rect * srcrect, const SDL_Rect * dstrect);
    1.12  static void D3D_RenderPresent(SDL_Renderer * renderer);
    1.13 @@ -708,8 +707,7 @@
    1.14  }
    1.15  
    1.16  static int
    1.17 -D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a,
    1.18 -               const SDL_Rect * rect)
    1.19 +D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
    1.20  {
    1.21      D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
    1.22      D3DRECT d3drect;
    1.23 @@ -727,7 +725,10 @@
    1.24  
    1.25      result =
    1.26          IDirect3DDevice9_Clear(data->device, 1, &d3drect, D3DCLEAR_TARGET,
    1.27 -                               D3DCOLOR_ARGB(a, r, g, b), 1.0f, 0);
    1.28 +                               D3DCOLOR_ARGB(renderer->a,
    1.29 +							                 renderer->r,
    1.30 +											 renderer->g,
    1.31 +											 renderer->b), 1.0f, 0);
    1.32      if (FAILED(result)) {
    1.33          D3D_SetError("Clear()", result);
    1.34          return -1;
     2.1 --- a/src/video/win32/SDL_gdirender.c	Thu Dec 25 05:11:29 2008 +0000
     2.2 +++ b/src/video/win32/SDL_gdirender.c	Thu Dec 25 05:16:18 2008 +0000
     2.3 @@ -55,8 +55,7 @@
     2.4                             const SDL_Rect * rect, int markDirty,
     2.5                             void **pixels, int *pitch);
     2.6  static void GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
     2.7 -static int GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
     2.8 -                          Uint8 a, const SDL_Rect * rect);
     2.9 +static int GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
    2.10  static int GDI_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
    2.11                            const SDL_Rect * srcrect, const SDL_Rect * dstrect);
    2.12  static void GDI_RenderPresent(SDL_Renderer * renderer);
    2.13 @@ -570,8 +569,7 @@
    2.14  }
    2.15  
    2.16  static int
    2.17 -GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a,
    2.18 -               const SDL_Rect * rect)
    2.19 +GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
    2.20  {
    2.21      GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata;
    2.22      RECT rc;
    2.23 @@ -588,7 +586,7 @@
    2.24      rc.bottom = rect->y + rect->h + 1;
    2.25  
    2.26      /* Should we cache the brushes? .. it looks like GDI does for us. :) */
    2.27 -    brush = CreateSolidBrush(RGB(r, g, b));
    2.28 +    brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b));
    2.29      SelectObject(data->current_hdc, brush);
    2.30      status = FillRect(data->current_hdc, &rc, brush);
    2.31      DeleteObject(brush);