From 9ee4ca4af663921dace9aa6bcdd206825adf145e Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Tue, 18 Jun 2013 19:13:29 -0700 Subject: [PATCH] Missed out making some tests portable. --- tests/sdl_canvas.c | 2 +- tests/sdl_canvas_twice.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sdl_canvas.c b/tests/sdl_canvas.c index 97cd13480..10044ff4f 100644 --- a/tests/sdl_canvas.c +++ b/tests/sdl_canvas.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) { // fill stuff SDL_Rect rect = { 200, 200, 175, 125 }; - SDL_FillRect(screen, &rect, 0x2222ffff); + SDL_FillRect(screen, &rect, SDL_MapRGBA(screen->format, 0x22, 0x22, 0xff, 0xff)); SDL_Flip(screen); diff --git a/tests/sdl_canvas_twice.c b/tests/sdl_canvas_twice.c index 6c6e48029..28a7a01c0 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);