mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
Qt: Fix crash opening game settings
This commit is contained in:
parent
7c2f335228
commit
0ba623b392
|
@ -90,7 +90,7 @@ GeneralSettingsWidget::GeneralSettingsWidget(SettingsDialog* dialog, QWidget* pa
|
||||||
m_ui.enableDiscordPresence->setEnabled(false);
|
m_ui.enableDiscordPresence->setEnabled(false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (AutoUpdaterDialog::isSupported())
|
if (!m_dialog->isPerGameSettings() && AutoUpdaterDialog::isSupported())
|
||||||
{
|
{
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.autoUpdateEnabled, "AutoUpdater", "CheckAtStartup", true);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.autoUpdateEnabled, "AutoUpdater", "CheckAtStartup", true);
|
||||||
dialog->registerWidgetHelp(m_ui.autoUpdateEnabled, tr("Enable Automatic Update Check"), tr("Checked"),
|
dialog->registerWidgetHelp(m_ui.autoUpdateEnabled, tr("Enable Automatic Update Check"), tr("Checked"),
|
||||||
|
|
|
@ -535,6 +535,12 @@ void MainWindow::onSystemResumed()
|
||||||
|
|
||||||
void MainWindow::onSystemDestroyed()
|
void MainWindow::onSystemDestroyed()
|
||||||
{
|
{
|
||||||
|
// update UI
|
||||||
|
{
|
||||||
|
QSignalBlocker sb(m_ui.actionPause);
|
||||||
|
m_ui.actionPause->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
s_system_valid = false;
|
s_system_valid = false;
|
||||||
s_system_paused = false;
|
s_system_paused = false;
|
||||||
updateEmulationActions(false, false, Achievements::ChallengeModeActive());
|
updateEmulationActions(false, false, Achievements::ChallengeModeActive());
|
||||||
|
|
|
@ -181,7 +181,7 @@ struct SettingAccessor<QComboBox>
|
||||||
}
|
}
|
||||||
static void setNullableStringValue(QComboBox* widget, std::optional<QString> value)
|
static void setNullableStringValue(QComboBox* widget, std::optional<QString> value)
|
||||||
{
|
{
|
||||||
isNullValue(widget) ? widget->setCurrentIndex(0) : setStringValue(widget, value.value());
|
value.has_value() ? setStringValue(widget, value.value()) : widget->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename F>
|
template<typename F>
|
||||||
|
|
Loading…
Reference in a new issue