From 1957c19f345452a7fee06c54cee343c93e5c6d41 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 2 Mar 2022 00:09:28 -0500 Subject: [PATCH] GUI: insert 100ms delay when minimized issue #220 --- src/gui/gui.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index bcbebef2a..e8b769a47 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -17,6 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #define _USE_MATH_DEFINES #include "gui.h" #include "util.h" @@ -5350,6 +5351,10 @@ bool FurnaceGUI::loop() { commitSettings(); willCommit=false; } + + if (SDL_GetWindowFlags(sdlWin)&SDL_WINDOW_MINIMIZED) { + SDL_Delay(100); + } } return false; }