mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
BACKENDS: OPENGLSDL: Limit window positioning workaround to Win32
It looks like other platforms are not affected by this, at least I wasn't able to reproduce the issue on Linux in any way. Since branching off to the next release is very soon and we are running out of time, I'm limiting this to Win32 in order to avoid unneccessary breakage by only fixing _really_ affected platforms.
This commit is contained in:
parent
4c7bc5effb
commit
1b42675e52
@ -544,11 +544,13 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
|
||||
|
||||
handleResize(actualWidth, actualHeight);
|
||||
|
||||
#ifdef WIN32
|
||||
// WORKAROUND: Prevent (nearly) offscreen positioning of the ScummVM window by forcefully
|
||||
// trigger a re-positioning event to center the window.
|
||||
if (!_wantsFullScreen && !(SDL_GetWindowFlags(_window->getSDLWindow()) & SDL_WINDOW_MAXIMIZED)) {
|
||||
SDL_SetWindowPosition(_window->getSDLWindow(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
#else
|
||||
// WORKAROUND: Working around infamous SDL bugs when switching
|
||||
|
Loading…
Reference in New Issue
Block a user