summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authoraldelaro5 <aldelaro5@gmail.com>2018-05-04 04:02:05 -0400
committeraldelaro5 <aldelaro5@gmail.com>2018-05-04 19:23:03 -0400
commitfee92cd4fcdada3befe0136a11a3476a456e92b8 (patch)
tree53d82730f2a635e331facb65f4837728b3e8e4b9 /Source
parenta5e410b7c9e07ab7d34e465c27c0f783a3b09675 (diff)
INI: Create a new INI setting for toggling the debugger UI
Qt introduced a checkbox to toggle the debugger UI, this makes it work into a setting stored in the INI, it also makes the -d argument only in effect when enabled, in such case, it will override the INI by overriding it.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/ConfigManager.cpp2
-rw-r--r--Source/Core/DolphinQt2/Main.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp
index 22cb976620..0518a6d400 100644
--- a/Source/Core/Core/ConfigManager.cpp
+++ b/Source/Core/Core/ConfigManager.cpp
@@ -175,6 +175,7 @@ void SConfig::SaveInterfaceSettings(IniFile& ini)
interface->Set("ThemeName", theme_name);
interface->Set("PauseOnFocusLost", m_PauseOnFocusLost);
interface->Set("DisableTooltips", m_DisableTooltips);
+ interface->Set("DebugModeEnabled", bEnableDebugging);
}
void SConfig::SaveDisplaySettings(IniFile& ini)
@@ -461,6 +462,7 @@ void SConfig::LoadInterfaceSettings(IniFile& ini)
interface->Get("ThemeName", &theme_name, DEFAULT_THEME_DIR);
interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false);
interface->Get("DisableTooltips", &m_DisableTooltips, false);
+ interface->Get("DebugModeEnabled", &bEnableDebugging, false);
}
void SConfig::LoadDisplaySettings(IniFile& ini)
diff --git a/Source/Core/DolphinQt2/Main.cpp b/Source/Core/DolphinQt2/Main.cpp
index 1c46d4403d..047618df5c 100644
--- a/Source/Core/DolphinQt2/Main.cpp
+++ b/Source/Core/DolphinQt2/Main.cpp
@@ -105,7 +105,6 @@ int main(int argc, char* argv[])
UICommon::CreateDirectories();
UICommon::Init();
Resources::Init();
- Settings::Instance().SetDebugModeEnabled(options.is_set("debugger"));
Settings::Instance().SetBatchModeEnabled(options.is_set("batch"));
// Hook up alerts from core
@@ -148,6 +147,8 @@ int main(int argc, char* argv[])
DolphinAnalytics::Instance()->ReportDolphinStart("qt");
MainWindow win{std::move(boot)};
+ if (options.is_set("debugger"))
+ Settings::Instance().SetDebugModeEnabled(true);
win.show();
#if defined(USE_ANALYTICS) && USE_ANALYTICS