aboutsummaryrefslogtreecommitdiff
path: root/tests/sdl_canvas_twice.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sdl_canvas_twice.c')
-rw-r--r--tests/sdl_canvas_twice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sdl_canvas_twice.c b/tests/sdl_canvas_twice.c
index 6c6e4802..28a7a01c 100644
--- a/tests/sdl_canvas_twice.c
+++ b/tests/sdl_canvas_twice.c
@@ -8,12 +8,12 @@ int main(int argc, char **argv) {
SDL_Init(SDL_INIT_VIDEO);
SDL_Surface *screen = SDL_SetVideoMode(40, 40, 32, SDL_SWSURFACE);
- SDL_FillRect(screen, NULL, 0xff0000ff);
+ SDL_FillRect(screen, NULL, SDL_MapRGBA(screen->format, 0xff, 0, 0, 0xff));
SDL_LockSurface(screen);
*((int*)screen->pixels + 95) = 0;
SDL_UnlockSurface(screen);
- SDL_FillRect(screen, NULL, 0x00ff00ff); // wipe out previous pixel and fill
+ SDL_FillRect(screen, NULL, SDL_MapRGBA(screen->format, 0, 0xff, 0, 0xff)); // wipe out previous pixel and fill
SDL_LockSurface(screen);
*((int*)screen->pixels + 205) = 0;
SDL_UnlockSurface(screen);