Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
2918:bd518fc76f28 | 2919:2f91a3847ae8 |
---|---|
53 int pitch); | 53 int pitch); |
54 static int GDI_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, | 54 static int GDI_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, |
55 const SDL_Rect * rect, int markDirty, | 55 const SDL_Rect * rect, int markDirty, |
56 void **pixels, int *pitch); | 56 void **pixels, int *pitch); |
57 static void GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); | 57 static void GDI_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); |
58 static int GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, | 58 static int GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); |
59 Uint8 a, const SDL_Rect * rect); | |
60 static int GDI_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, | 59 static int GDI_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, |
61 const SDL_Rect * srcrect, const SDL_Rect * dstrect); | 60 const SDL_Rect * srcrect, const SDL_Rect * dstrect); |
62 static void GDI_RenderPresent(SDL_Renderer * renderer); | 61 static void GDI_RenderPresent(SDL_Renderer * renderer); |
63 static void GDI_DestroyTexture(SDL_Renderer * renderer, | 62 static void GDI_DestroyTexture(SDL_Renderer * renderer, |
64 SDL_Texture * texture); | 63 SDL_Texture * texture); |
568 UpdateYUVTextureData(texture); | 567 UpdateYUVTextureData(texture); |
569 } | 568 } |
570 } | 569 } |
571 | 570 |
572 static int | 571 static int |
573 GDI_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a, | 572 GDI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect) |
574 const SDL_Rect * rect) | |
575 { | 573 { |
576 GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata; | 574 GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata; |
577 RECT rc; | 575 RECT rc; |
578 HBRUSH brush; | 576 HBRUSH brush; |
579 int status; | 577 int status; |
586 rc.top = rect->y; | 584 rc.top = rect->y; |
587 rc.right = rect->x + rect->w + 1; | 585 rc.right = rect->x + rect->w + 1; |
588 rc.bottom = rect->y + rect->h + 1; | 586 rc.bottom = rect->y + rect->h + 1; |
589 | 587 |
590 /* Should we cache the brushes? .. it looks like GDI does for us. :) */ | 588 /* Should we cache the brushes? .. it looks like GDI does for us. :) */ |
591 brush = CreateSolidBrush(RGB(r, g, b)); | 589 brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b)); |
592 SelectObject(data->current_hdc, brush); | 590 SelectObject(data->current_hdc, brush); |
593 status = FillRect(data->current_hdc, &rc, brush); | 591 status = FillRect(data->current_hdc, &rc, brush); |
594 DeleteObject(brush); | 592 DeleteObject(brush); |
595 | 593 |
596 if (!status) { | 594 if (!status) { |