SDL/src/video/android
Sam Lantinga f674f2311a Fixed bug 2808 - Fix SDL reporting wrong window size on resume
Jonas Kulla

At startup time, the single android window is assigned a "windowed" (window->windowed.{w,h}) size based on the current orientation of the mobile device; this size is never updated throughout the lifetime of the app.

This becomes problematic when the app is paused and then resumed in an orientation that it did not start up in. Eventually, 'SDL_OnWindowRestored()' is called, which calls 'SDL_UpdateFullscreenMode()'. This function is very problematic because it is written with a desktop monitor in mind: it tries to find a matching display mode for the windowed size, doesn't find any, and finally applies the windowed size as the fullscreen one. In the end, the windowed size is reported in a RESIZED event, which doesn't correspond to the actual surface size.

To see this in action: Start an orientation aware SDL app in eg. portrait mode, suspend the app, put the device into landscape orientation and resume the app. It will erroneously render in portrait mode (until the device is rotated again).
2016-10-07 15:21:19 -07:00
..
SDL_androidclipboard.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidclipboard.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidevents.c audio: Renamed some internal driver symbols in various targets. 2016-08-11 22:22:09 -04:00
SDL_androidevents.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidgl.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidkeyboard.c Android: Added new key codes from API 24. 2016-07-09 22:06:00 +02:00
SDL_androidkeyboard.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidmessagebox.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidmessagebox.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidmouse.c Android: Fixed missing mouse motion events while button down (thanks, Sylvain!). 2016-08-30 21:14:52 +02:00
SDL_androidmouse.h Android: Added mouse initialization to reset state. 2016-01-12 22:23:00 +01:00
SDL_androidtouch.c Remove almost all instances of "volatile" keyword. 2016-01-03 06:50:50 -05:00
SDL_androidtouch.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidvideo.c Fixed bug 2808 - Fix SDL reporting wrong window size on resume 2016-10-07 15:21:19 -07:00
SDL_androidvideo.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidwindow.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_androidwindow.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00