mirror of https://github.com/encounter/SDL.git
f674f2311a
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). |
||
---|---|---|
.. | ||
SDL_androidclipboard.c | ||
SDL_androidclipboard.h | ||
SDL_androidevents.c | ||
SDL_androidevents.h | ||
SDL_androidgl.c | ||
SDL_androidkeyboard.c | ||
SDL_androidkeyboard.h | ||
SDL_androidmessagebox.c | ||
SDL_androidmessagebox.h | ||
SDL_androidmouse.c | ||
SDL_androidmouse.h | ||
SDL_androidtouch.c | ||
SDL_androidtouch.h | ||
SDL_androidvideo.c | ||
SDL_androidvideo.h | ||
SDL_androidwindow.c | ||
SDL_androidwindow.h |