From 9af40da53e2f8cc58bcea9ffc9a11da251bb5c97 Mon Sep 17 00:00:00 2001 From: The Dax Date: Mon, 30 Jun 2014 13:04:44 -0400 Subject: [PATCH] Make the ini tweak available for everybody. --- Core/Config.cpp | 2 +- Core/Config.h | 3 ++- Core/Core.cpp | 2 +- Windows/WndMainWindow.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 6c64e79b06..5f419084f1 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -309,8 +309,8 @@ static ConfigSetting generalSettings[] = { ConfigSetting("WindowWidth", &g_Config.iWindowWidth, 0), // 0 will be automatically reset later (need to do the AdjustWindowRect dance). ConfigSetting("WindowHeight", &g_Config.iWindowHeight, 0), ConfigSetting("PauseOnLostFocus", &g_Config.bPauseOnLostFocus, false), - ConfigSetting("PauseWhenMinimized", &g_Config.bPauseWhenMinimized, true), #endif + ConfigSetting("PauseWhenMinimized", &g_Config.bPauseWhenMinimized, true), ConfigSetting("DumpDecryptedEboots", &g_Config.bDumpDecryptedEboot, false), ConfigSetting(false), }; diff --git a/Core/Config.h b/Core/Config.h index 0dab875025..f262a4710a 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -72,9 +72,10 @@ public: bool bTopMost; std::string sFont; bool bIgnoreWindowsKey; - bool bPauseWhenMinimized; #endif + bool bPauseWhenMinimized; + #if !defined(MOBILE_DEVICE) bool bPauseExitsEmulator; #endif diff --git a/Core/Core.cpp b/Core/Core.cpp index f0c19dcd72..d93d02a74a 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -135,7 +135,7 @@ void UpdateScreenScale(int width, int height) { } void UpdateRunLoop() { - if (windowHidden) { + if (windowHidden && g_Config.bPauseWhenMinimized) { sleep_ms(16); return; } diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index b45383a15b..ac2543bac8 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -1100,7 +1100,7 @@ namespace MainWindow ResizeDisplay(); break; case SIZE_MINIMIZED: - Core_NotifyWindowHidden(g_Config.bPauseWhenMinimized); + Core_NotifyWindowHidden(true); if (!g_Config.bPauseWhenMinimized) { NativeMessageReceived("window minimized", "true"); }