mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-09 02:39:42 +00:00
Android treat FULLSCREEN flag as FULLSCREEN_DESKTOP
This commit is contained in:
committed by
Sam Lantinga
parent
1414dbf29d
commit
3f1534af43
@@ -1344,6 +1344,12 @@ int SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)
|
||||
|
||||
display = SDL_GetDisplayForWindow(window);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
/* Android does not support native resolution changes (SDL_WINDOW_FULLSCREEN) */
|
||||
if((window->flags & FULLSCREEN_MASK) != 0) {
|
||||
fullscreen_mode = display->desktop_mode;
|
||||
}
|
||||
#else
|
||||
/* if in desktop size mode, just return the size of the desktop */
|
||||
if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
||||
fullscreen_mode = display->desktop_mode;
|
||||
@@ -1353,6 +1359,7 @@ int SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)
|
||||
SDL_zerop(mode);
|
||||
return SDL_SetError("Couldn't find display mode match");
|
||||
}
|
||||
#endif
|
||||
|
||||
*mode = fullscreen_mode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user