From adbe70fa05118c149650723cdbbee7e82637e448 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 29 Jan 2022 17:27:51 -0500 Subject: [PATCH] GUI: remember window size --- src/gui/gui.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index e385eae6d..fdd9144a9 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -5356,6 +5356,9 @@ bool FurnaceGUI::init() { SDL_Surface* icon=SDL_CreateRGBSurfaceFrom(furIcon,256,256,32,256*4,0xff,0xff00,0xff0000,0xff000000); #endif + scrW=e->getConfInt("lastWindowWidth",1280); + scrH=e->getConfInt("lastWindowHeight",800); + SDL_Rect displaySize; sdlWin=SDL_CreateWindow("Furnace",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,scrW*dpiScale,scrH*dpiScale,SDL_WINDOW_RESIZABLE|SDL_WINDOW_ALLOW_HIGHDPI); @@ -5450,6 +5453,10 @@ bool FurnaceGUI::finish() { e->setConf("mixerOpen",mixerOpen); e->setConf("oscOpen",oscOpen); + // commit last window size + e->setConf("lastWindowWidth",scrW); + e->setConf("lastWindowHeight",scrH); + for (int i=0; i