Fixed bug 4246 - Android: orientation between portrait<->landscape doesn't work

Improve handling of landscape/portrait orientation. Promote to SCREEN_ORIENTATION_SENSOR_* when needed.
Android window can be somehow resizable.
If SDL_WINDOW_RESIZABLE is set, window size change is allowed, for instance when orientation changes (provided the hint allows it).
This commit is contained in:
Sylvain Becker
2020-01-17 12:04:18 +01:00
parent a8780c6a28
commit d52ba78b29
2 changed files with 43 additions and 21 deletions

View File

@@ -58,7 +58,6 @@ Android_CreateWindow(_THIS, SDL_Window * window)
window->w = Android_SurfaceWidth;
window->h = Android_SurfaceHeight;
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */
window->flags &= ~SDL_WINDOW_HIDDEN;
window->flags |= SDL_WINDOW_SHOWN; /* only one window on Android */