diff --git a/Source/Core/DolphinQt/Config/SettingsWindow.cpp b/Source/Core/DolphinQt/Config/SettingsWindow.cpp index e80b1fa7ff..283cd3786e 100644 --- a/Source/Core/DolphinQt/Config/SettingsWindow.cpp +++ b/Source/Core/DolphinQt/Config/SettingsWindow.cpp @@ -210,3 +210,8 @@ void SettingsWindow::SelectPane(SettingsWindowPaneIndex index) { ActivatePane(std::to_underlying(index)); } + +void SettingsWindow::closeEvent(QCloseEvent*) +{ + Config::Save(); +} diff --git a/Source/Core/DolphinQt/Config/SettingsWindow.h b/Source/Core/DolphinQt/Config/SettingsWindow.h index 3874c75ae0..c27d6e919d 100644 --- a/Source/Core/DolphinQt/Config/SettingsWindow.h +++ b/Source/Core/DolphinQt/Config/SettingsWindow.h @@ -60,4 +60,6 @@ public: explicit SettingsWindow(MainWindow* parent); void SelectPane(SettingsWindowPaneIndex); + + void closeEvent(QCloseEvent* event) override; }; diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 802292f688..7561aaa939 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -16,7 +16,6 @@ #include "Core/AchievementManager.h" #include "Core/Config/MainSettings.h" #include "Core/Config/UISettings.h" -#include "Core/ConfigManager.h" #include "Core/Core.h" #include "Core/DolphinAnalytics.h" #include "Core/System.h" @@ -117,7 +116,6 @@ void GeneralPane::ConnectLayout() connect(m_combobox_speedlimit, &QComboBox::currentIndexChanged, [this] { Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED, m_combobox_speedlimit->currentIndex() * 0.1f); - Config::Save(); }); connect(m_combobox_fallback_region, &QComboBox::currentIndexChanged, this, @@ -339,7 +337,6 @@ void GeneralPane::OnSaveConfig() { Config::ConfigChangeCallbackGuard config_guard; - auto& settings = SConfig::GetInstance(); if (AutoUpdateChecker::SystemSupportsAutoUpdates()) { Settings::Instance().SetAutoUpdateTrack( @@ -356,8 +353,6 @@ void GeneralPane::OnSaveConfig() #endif Settings::Instance().SetFallbackRegion( UpdateFallbackRegionFromIndex(m_combobox_fallback_region->currentIndex())); - - settings.SaveSettings(); } #if defined(USE_ANALYTICS) && USE_ANALYTICS diff --git a/Source/Core/DolphinQt/Settings/WiiPane.cpp b/Source/Core/DolphinQt/Settings/WiiPane.cpp index 19d54ca50c..bab5b9b540 100644 --- a/Source/Core/DolphinQt/Settings/WiiPane.cpp +++ b/Source/Core/DolphinQt/Settings/WiiPane.cpp @@ -369,7 +369,6 @@ void WiiPane::OnUSBWhitelistAddButton() } whitelist.emplace(*usb_device); Config::SetUSBDeviceWhitelist(whitelist); - Config::Save(); PopulateUSBPassthroughListWidget(); }