mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
BACKENDS: OPENGLSDL: Forcefully center the window to prevent off-screen rendering
This commit is contained in:
parent
cedd57a4ac
commit
1b6c4f48aa
@ -543,6 +543,10 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
|
||||
getWindowSizeFromSdl(&actualWidth, &actualHeight);
|
||||
|
||||
handleResize(actualWidth, actualHeight);
|
||||
|
||||
// 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);
|
||||
return true;
|
||||
#else
|
||||
// WORKAROUND: Working around infamous SDL bugs when switching
|
||||
|
Loading…
Reference in New Issue
Block a user