mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
fullscreen resize fix
This commit is contained in:
parent
be151cbfcc
commit
a97ce0b6e6
1 changed files with 11 additions and 1 deletions
|
|
@ -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 :
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue