mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
BACKENDS: OPENGLSDL: Do not try to center window in fullscreen or maximized mode
This commit is contained in:
parent
1b6c4f48aa
commit
4c7bc5effb
@ -546,7 +546,9 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
|
||||
|
||||
// WORKAROUND: Prevent (nearly) offscreen positioning of the ScummVM window by forcefully
|
||||
// trigger a re-positioning event to center the window.
|
||||
SDL_SetWindowPosition(_window->getSDLWindow(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
||||
if (!_wantsFullScreen && !(SDL_GetWindowFlags(_window->getSDLWindow()) & SDL_WINDOW_MAXIMIZED)) {
|
||||
SDL_SetWindowPosition(_window->getSDLWindow(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
||||
}
|
||||
return true;
|
||||
#else
|
||||
// WORKAROUND: Working around infamous SDL bugs when switching
|
||||
|
Loading…
Reference in New Issue
Block a user