mouse & exit fullscreen fixed

-fix mouse switch
-exit from fullscreen now reverts window to the default size and centers it on the screen
This commit is contained in:
pk-2000 2020-04-27 02:44:40 +03:00 committed by GitHub
parent ff03474252
commit 71ed2e43e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -122,6 +122,10 @@ void EventThread::process(RGSSThreadData &rtData)
#endif
fullscreen = rtData.config.fullscreen;
showCursor = rtData.config.showCursor;
int defScreenW, defScreenH;
defScreenW = rtData.config.defScreenW;
defScreenH = rtData.config.defScreenH;
int toggleFSMod = rtData.config.anyAltToggleFS ? KMOD_ALT : KMOD_LALT;
fps.lastFrame = SDL_GetPerformanceCounter();
@ -265,6 +269,11 @@ void EventThread::process(RGSSThreadData &rtData)
pendingTitle[0] = '\0';
havePendingTitle = false;
}
else
{
SDL_SetWindowSize(win, defScreenW, defScreenH);
SDL_SetWindowPosition(win, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
}
break;
}