From 707b966496f92e9b2c9aa5ca3ed85573fb7eb0fa Mon Sep 17 00:00:00 2001 From: spycrab Date: Fri, 18 May 2018 20:15:14 +0200 Subject: [PATCH] Qt/GameConfigWidget: Fix checkboxes not being saved properly --- Source/Core/DolphinQt2/Config/GameConfigWidget.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp b/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp index 374e5657f7..3c351721c5 100644 --- a/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp +++ b/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp @@ -40,8 +40,6 @@ GameConfigWidget::GameConfigWidget(const UICommon::GameFile& game) : m_game(game m_game_id = m_game.GetGameID(); m_gameini_local_path = QString::fromStdString(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini"); - m_gameini_local = SConfig::LoadLocalGameIni(m_game_id, m_game.GetRevision()); - m_gameini_default = SConfig::LoadDefaultGameIni(m_game_id, m_game.GetRevision()); CreateWidgets(); LoadSettings(); @@ -156,7 +154,7 @@ void GameConfigWidget::ConnectWidgets() for (QCheckBox* box : {m_enable_dual_core, m_enable_mmu, m_enable_fprf, m_sync_gpu, m_enable_fast_disc, m_use_dsp_hle, m_use_monoscopic_shadows}) - connect(box, &QCheckBox::toggled, this, &GameConfigWidget::SaveSettings); + connect(box, &QCheckBox::stateChanged, this, &GameConfigWidget::SaveSettings); connect(m_deterministic_dual_core, static_cast(&QComboBox::currentIndexChanged), this, @@ -216,6 +214,10 @@ void GameConfigWidget::SaveCheckBox(QCheckBox* checkbox, const std::string& sect void GameConfigWidget::LoadSettings() { + // Reload config + m_gameini_local = SConfig::LoadLocalGameIni(m_game_id, m_game.GetRevision()); + m_gameini_default = SConfig::LoadDefaultGameIni(m_game_id, m_game.GetRevision()); + // Load game-specific settings // Core