Qt: Fix safe mode not resetting on gamesettings clear

This commit is contained in:
Stenzek 2024-10-21 00:09:11 +10:00
parent 05c285f760
commit be268d8bf1
No known key found for this signature in database

View File

@ -190,6 +190,9 @@ void SettingsWindow::addPages()
connect(m_advanced_settings, &AdvancedSettingsWidget::onShowDebugOptionsChanged, m_graphics_settings,
&GraphicsSettingsWidget::onShowDebugSettingsChanged);
if (isPerGameSettings())
SettingWidgetBinder::BindWidgetToBoolSetting(m_sif.get(), m_ui.safeMode, "Main", "DisableAllEnhancements", false);
}
void SettingsWindow::reloadPages()
@ -206,6 +209,8 @@ void SettingsWindow::reloadPages()
delete widget;
}
m_ui.safeMode->disconnect();
addPages();
}
@ -241,7 +246,6 @@ void SettingsWindow::connectUi()
if (m_ui.clearGameSettings)
connect(m_ui.clearGameSettings, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked);
SettingWidgetBinder::BindWidgetToBoolSetting(m_sif.get(), m_ui.safeMode, "Main", "DisableAllEnhancements", false);
registerWidgetHelp(m_ui.safeMode, tr("Safe Mode"), tr("Unchecked"),
tr("Disables all enhancement options, simulating the system as accurately as possible. Use to "
"quickly determine whether an enhancement is responsible for game bugs."));