fullscreen resize fix

This commit is contained in:
CatWindow 2026-08-18 21:32:39 +03:00
parent be151cbfcc
commit a97ce0b6e6

View file

@ -390,9 +390,19 @@ void EventThread::process(RGSSThreadData &rtData){
break; break;
case REQUEST_SETFULLSCREEN : case REQUEST_SETFULLSCREEN :
setFullscreen(win, static_cast<bool>(event.user.code)); setFullscreen(win, static_cast<bool>(event.user.code));
if (!fullscreen)
SDL_SetWindowSize(win, shState->graphics().width(), shState->graphics().height());
break; break;
case REQUEST_WINRESIZE : case REQUEST_WINRESIZE :
if (fullscreen)
{
int winW;
int winH;
SDL_GetWindowSize(win, &winW, &winH);
windowSizeMsg.post(Vec2i(winW, winH));
}
else
SDL_SetWindowSize(win, event.window.data1, event.window.data2); SDL_SetWindowSize(win, event.window.data1, event.window.data2);
break; break;
case REQUEST_WINMOVETO : case REQUEST_WINMOVETO :