From f057581b279e7678a3d4819eb81564ac5f38105f Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 27 Apr 2022 20:40:30 -0500 Subject: [PATCH] GUI: possibly remember maximized state --- src/gui/gui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index fdfdf86fc..5469ac417 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3613,6 +3613,10 @@ bool FurnaceGUI::init() { } if (SDL_GetDisplayUsableBounds(SDL_GetWindowDisplayIndex(sdlWin),&displaySize)==0) { + if (scrW>((displaySize.w/dpiScale)-32) && scrH>((displaySize.h/dpiScale)-32)) { + // maximize + SDL_MaximizeWindow(sdlWin); + } if (scrW>displaySize.w/dpiScale) scrW=(displaySize.w/dpiScale)-32; if (scrH>displaySize.h/dpiScale) scrH=(displaySize.h/dpiScale)-32; if (!fullScreen) {