mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
OPENGLSDL: Properly check for fullscreen state
The OpenGLSDLGraphicsManager was changed in bb15133a0a
to use
SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN.
But getFeatureState(kFeatureFullscreenMode) was still checking
the SDL_WINDOW_FULLSCREEN flag. This worked because in current
SDL2 versions SDL_WINDOW_FULLSCREEN_DESKTOP is defined as
SDL_WINDOW_FULLSCREEN | 0x00001000, but this is not documented
and could change in future SDL versions.
This commit is contained in:
parent
06c36d590d
commit
8d972b338d
@ -232,7 +232,7 @@ bool OpenGLSdlGraphicsManager::getFeatureState(OSystem::Feature f) const {
|
||||
case OSystem::kFeatureFullscreenMode:
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
if (_window && _window->getSDLWindow()) {
|
||||
return (SDL_GetWindowFlags(_window->getSDLWindow()) & SDL_WINDOW_FULLSCREEN) != 0;
|
||||
return (SDL_GetWindowFlags(_window->getSDLWindow()) & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0;
|
||||
} else {
|
||||
return _wantsFullScreen;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user