mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-07-11 01:24:22 +02:00
Merge pull request #14438 from JosJuice/save-on-settings-close
DolphinQt: Save when closing settings window
This commit is contained in:
@@ -210,3 +210,8 @@ void SettingsWindow::SelectPane(SettingsWindowPaneIndex index)
|
||||
{
|
||||
ActivatePane(std::to_underlying(index));
|
||||
}
|
||||
|
||||
void SettingsWindow::closeEvent(QCloseEvent*)
|
||||
{
|
||||
Config::Save();
|
||||
}
|
||||
|
||||
@@ -60,4 +60,6 @@ public:
|
||||
explicit SettingsWindow(MainWindow* parent);
|
||||
|
||||
void SelectPane(SettingsWindowPaneIndex);
|
||||
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -369,7 +369,6 @@ void WiiPane::OnUSBWhitelistAddButton()
|
||||
}
|
||||
whitelist.emplace(*usb_device);
|
||||
Config::SetUSBDeviceWhitelist(whitelist);
|
||||
Config::Save();
|
||||
PopulateUSBPassthroughListWidget();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user