src/video/android/SDL_androidvideo.c
changeset 9314 8d826bc39a45
parent 9173 c677ab1148c5
child 9317 a8350b28a05c
     1.1 --- a/src/video/android/SDL_androidvideo.c	Sun Jan 18 02:50:14 2015 -0500
     1.2 +++ b/src/video/android/SDL_androidvideo.c	Fri Jan 23 20:29:08 2015 +0100
     1.3 @@ -64,6 +64,8 @@
     1.4  int Android_ScreenWidth = 0;
     1.5  int Android_ScreenHeight = 0;
     1.6  Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
     1.7 +int Android_ScreenRate = 0;
     1.8 +
     1.9  SDL_sem *Android_PauseSem = NULL, *Android_ResumeSem = NULL;
    1.10  
    1.11  /* Currently only one window */
    1.12 @@ -166,7 +168,7 @@
    1.13      mode.format = Android_ScreenFormat;
    1.14      mode.w = Android_ScreenWidth;
    1.15      mode.h = Android_ScreenHeight;
    1.16 -    mode.refresh_rate = 0;
    1.17 +    mode.refresh_rate = Android_ScreenRate;
    1.18      mode.driverdata = NULL;
    1.19      if (SDL_AddBasicVideoDisplay(&mode) < 0) {
    1.20          return -1;
    1.21 @@ -189,11 +191,12 @@
    1.22  
    1.23  /* This function gets called before VideoInit() */
    1.24  void
    1.25 -Android_SetScreenResolution(int width, int height, Uint32 format)
    1.26 +Android_SetScreenResolution(int width, int height, Uint32 format, float rate)
    1.27  {
    1.28      Android_ScreenWidth = width;
    1.29      Android_ScreenHeight = height;
    1.30      Android_ScreenFormat = format;
    1.31 +    Android_ScreenRate = rate;
    1.32  
    1.33      if (Android_Window) {
    1.34          SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, width, height);