mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-03 08:28:29 +00:00
Track android device panel width & height as well as window surface & height.
Expand SDLActivity::SDLSurface::surfaceChanged() callback to grab the panel width and height at the same time and pass that along to the native code. Only works on API 17+. Duplicates surface dimensions whenever it fails. Add Android_DeviceWidth/Android_DeviceHeight globals to native code. Disambiguate Android_ScreenWidth/Android_ScreenHeight -> Android_SurfaceWidth/Android_SurfaceHeight Use device width/height for all display mode settings.
This commit is contained in:
@@ -49,8 +49,8 @@ Android_CreateWindow(_THIS, SDL_Window * window)
|
||||
/* Adjust the window data to match the screen */
|
||||
window->x = 0;
|
||||
window->y = 0;
|
||||
window->w = Android_ScreenWidth;
|
||||
window->h = Android_ScreenHeight;
|
||||
window->w = Android_SurfaceWidth;
|
||||
window->h = Android_SurfaceHeight;
|
||||
|
||||
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */
|
||||
window->flags &= ~SDL_WINDOW_HIDDEN;
|
||||
|
Reference in New Issue
Block a user