800x600 minimum resolution and exit fullscreen fix
This commit is contained in:
parent
0252112a98
commit
657da03823
|
@ -128,8 +128,8 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
defScreenH = rtData.config.defScreenH;
|
||||
SDL_GetDesktopDisplayMode(0, &dm);
|
||||
SDL_SetWindowMaximumSize(win, dm.w, dm.h);
|
||||
SDL_SetWindowMinimumSize(win, 256, 192);
|
||||
SDL_SetWindowSize(win, 256, 192);
|
||||
SDL_SetWindowMinimumSize(win, 800, 600);
|
||||
SDL_SetWindowSize(win, 800, 600);
|
||||
int defScreenW_new, defScreenH_new;
|
||||
int firstrun;
|
||||
firstrun = 0;
|
||||
|
@ -279,6 +279,11 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
if (event.key.keysym.scancode == SDL_SCANCODE_RETURN &&
|
||||
(event.key.keysym.mod & toggleFSMod))
|
||||
{
|
||||
if (!fullscreen && firstrun < 2)
|
||||
{
|
||||
firstrun = 2;
|
||||
SDL_SetWindowPosition(win, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
||||
}
|
||||
setFullscreen(win, !fullscreen);
|
||||
if (!fullscreen && havePendingTitle)
|
||||
{
|
||||
|
@ -291,6 +296,11 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
{
|
||||
SDL_SetWindowSize(win, defScreenW_new, defScreenH_new);
|
||||
}
|
||||
if (firstrun < 2)
|
||||
{
|
||||
firstrun = 2;
|
||||
SDL_SetWindowPosition(win, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue