Commit c5536830 authored by Sam Lantinga's avatar Sam Lantinga

Fixed compiling Windows renderers. Lines and points will be implemented later.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403381
parent c53a7c6c
...@@ -62,8 +62,7 @@ static int D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -62,8 +62,7 @@ static int D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
static void D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); static void D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
static void D3D_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, static void D3D_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
int numrects, const SDL_Rect * rects); int numrects, const SDL_Rect * rects);
static int D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, static int D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
Uint8 a, const SDL_Rect * rect);
static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * dstrect); const SDL_Rect * srcrect, const SDL_Rect * dstrect);
static void D3D_RenderPresent(SDL_Renderer * renderer); static void D3D_RenderPresent(SDL_Renderer * renderer);
...@@ -708,8 +707,7 @@ D3D_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, int numrects, ...@@ -708,8 +707,7 @@ D3D_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, int numrects,
} }
static int static int
D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a, D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
const SDL_Rect * rect)
{ {
D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
D3DRECT d3drect; D3DRECT d3drect;
...@@ -727,7 +725,10 @@ D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a, ...@@ -727,7 +725,10 @@ D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a,
result = result =
IDirect3DDevice9_Clear(data->device, 1, &d3drect, D3DCLEAR_TARGET, IDirect3DDevice9_Clear(data->device, 1, &d3drect, D3DCLEAR_TARGET,
D3DCOLOR_ARGB(a, r, g, b), 1.0f, 0); D3DCOLOR_ARGB(renderer->a,
renderer->r,
renderer->g,
renderer->b), 1.0f, 0);
if (FAILED(result)) { if (FAILED(result)) {
D3D_SetError("Clear()", result); D3D_SetError("Clear()", result);
return -1; return -1;
......
...@@ -55,8 +55,7 @@ static int GDI_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -55,8 +55,7 @@ static int GDI_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, int markDirty, const SDL_Rect * rect, int markDirty,
void **pixels, int *pitch); void **pixels, int *pitch);
static void GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); static void GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
static int GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, static int GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
Uint8 a, const SDL_Rect * rect);
static int GDI_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, static int GDI_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * dstrect); const SDL_Rect * srcrect, const SDL_Rect * dstrect);
static void GDI_RenderPresent(SDL_Renderer * renderer); static void GDI_RenderPresent(SDL_Renderer * renderer);
...@@ -570,8 +569,7 @@ GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) ...@@ -570,8 +569,7 @@ GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
} }
static int static int
GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a, GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
const SDL_Rect * rect)
{ {
GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata; GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata;
RECT rc; RECT rc;
...@@ -588,7 +586,7 @@ GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a, ...@@ -588,7 +586,7 @@ GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a,
rc.bottom = rect->y + rect->h + 1; rc.bottom = rect->y + rect->h + 1;
/* Should we cache the brushes? .. it looks like GDI does for us. :) */ /* 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); SelectObject(data->current_hdc, brush);
status = FillRect(data->current_hdc, &rc, brush); status = FillRect(data->current_hdc, &rc, brush);
DeleteObject(brush); DeleteObject(brush);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment