test/testbitmap.c
changeset 2765 f55c87ae336b
parent 1895 c121d94672cb
child 3094 c0ce3380742d
     1.1 --- a/test/testbitmap.c	Wed Sep 17 08:24:51 2008 +0000
     1.2 +++ b/test/testbitmap.c	Sat Oct 04 06:46:59 2008 +0000
     1.3 @@ -68,6 +68,7 @@
     1.4      Uint8 gradient;
     1.5      SDL_Color palette[256];
     1.6  
     1.7 +    int video_w, video_h;
     1.8  
     1.9      /* Initialize SDL */
    1.10      if (SDL_Init(SDL_INIT_VIDEO) < 0) {
    1.11 @@ -96,10 +97,19 @@
    1.12          }
    1.13      }
    1.14  
    1.15 +#ifdef __IPHONEOS__
    1.16 +    video_w = 320;
    1.17 +    video_h = 480;
    1.18 +#else
    1.19 +    video_w = 640;
    1.20 +    video_h = 480;
    1.21 +#endif
    1.22 +
    1.23      /* Set 640x480 video mode */
    1.24 -    if ((screen = SDL_SetVideoMode(640, 480, video_bpp, videoflags)) == NULL) {
    1.25 -        fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
    1.26 -                video_bpp, SDL_GetError());
    1.27 +    if ((screen =
    1.28 +         SDL_SetVideoMode(video_w, video_h, video_bpp, videoflags)) == NULL) {
    1.29 +        fprintf(stderr, "Couldn't set %%d%d video mode: %s\n", video_w,
    1.30 +                video_h, video_bpp, SDL_GetError());
    1.31          quit(2);
    1.32      }
    1.33