From e6ffd3e1455630f03e1ef28a84db8247c257c469 Mon Sep 17 00:00:00 2001 From: pk-2000 <63214388+pk-2000@users.noreply.github.com> Date: Thu, 31 Dec 2020 07:15:51 +0200 Subject: [PATCH] Set min/max window size --- src/eventthread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/eventthread.cpp b/src/eventthread.cpp index 265465c..0b95f4d 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -126,6 +126,9 @@ void EventThread::process(RGSSThreadData &rtData) int defScreenW, defScreenH; defScreenW = rtData.config.defScreenW; defScreenH = rtData.config.defScreenH; + SDL_GetDesktopDisplayMode(0, &dm); + SDL_SetWindowMaximumSize(win, dm.w, dm.h); + SDL_SetWindowMinimumSize(win, 544, 416); SDL_SetWindowSize(win, 544, 416); int defScreenW_new, defScreenH_new; int firstrun; @@ -216,7 +219,7 @@ void EventThread::process(RGSSThreadData &rtData) { case SDL_WINDOWEVENT_SIZE_CHANGED : winW = event.window.data1; - winH = event.window.data2; + winH = event.window.data2; if (firstrun == 1) { firstrun = 2;