src/video/android/SDL_androidvideo.c
changeset 10475 82f21f6121db
parent 10438 f7d8e9d871c5
child 10672 10fb0ebc4fbf
     1.1 --- a/src/video/android/SDL_androidvideo.c	Fri Oct 07 15:08:37 2016 -0700
     1.2 +++ b/src/video/android/SDL_androidvideo.c	Fri Oct 07 15:21:19 2016 -0700
     1.3 @@ -220,6 +220,15 @@
     1.4  
     1.5      if (Android_Window) {
     1.6          SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, width, height);
     1.7 +
     1.8 +        /* Force the current mode to match the resize otherwise the SDL_WINDOWEVENT_RESTORED event
     1.9 +         * will fall back to the old mode */
    1.10 +        SDL_VideoDisplay *display = SDL_GetDisplayForWindow(Android_Window);
    1.11 +
    1.12 +        display->current_mode.format = format;
    1.13 +        display->current_mode.w = width;
    1.14 +        display->current_mode.h = height;
    1.15 +        display->current_mode.refresh_rate = rate;
    1.16      }
    1.17  }
    1.18