src/video/android/SDL_androidvideo.c
changeset 4716 f2c2a33a1a38
parent 4713 ba38983b10c2
child 4960 0ab2492f2e17
     1.1 --- a/src/video/android/SDL_androidvideo.c	Tue Jul 27 10:20:22 2010 +0200
     1.2 +++ b/src/video/android/SDL_androidvideo.c	Tue Jul 27 10:49:11 2010 +0200
     1.3 @@ -57,6 +57,12 @@
     1.4  /* Android driver bootstrap functions */
     1.5  
     1.6  
     1.7 +//These are filled in with real values in Android_SetScreenResolution on 
     1.8 +//init (before SDL_Main())
     1.9 +static int iScreenWidth = 320;
    1.10 +static int iScreenHeight = 240;
    1.11 +
    1.12 +
    1.13  static int
    1.14  Android_Available(void)
    1.15  {
    1.16 @@ -120,8 +126,8 @@
    1.17  
    1.18      /* Use a fake 32-bpp desktop mode */
    1.19      mode.format = SDL_PIXELFORMAT_RGB888;
    1.20 -    mode.w = 320;
    1.21 -    mode.h = 480;
    1.22 +    mode.w = iScreenWidth;
    1.23 +    mode.h = iScreenHeight;
    1.24      mode.refresh_rate = 0;
    1.25      mode.driverdata = NULL;
    1.26      if (SDL_AddBasicVideoDisplay(&mode) < 0) {
    1.27 @@ -150,5 +156,11 @@
    1.28  }
    1.29  
    1.30  
    1.31 +void Android_SetScreenResolution(int width, int height){
    1.32 +    iScreenWidth = width;
    1.33 +    iScreenHeight = height;   
    1.34 +}
    1.35 +
    1.36 +
    1.37  
    1.38  /* vi: set ts=4 sw=4 expandtab: */