From 5e21234966b09a1eb156a5df44747efe8071b893 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 15 Dec 2024 12:59:30 +1000 Subject: [PATCH] Qt: Fix deadlock in Game Properties -> Post-Processing --- src/duckstation-qt/postprocessingsettingswidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/duckstation-qt/postprocessingsettingswidget.cpp b/src/duckstation-qt/postprocessingsettingswidget.cpp index 3abc26446..960530f96 100644 --- a/src/duckstation-qt/postprocessingsettingswidget.cpp +++ b/src/duckstation-qt/postprocessingsettingswidget.cpp @@ -284,16 +284,17 @@ PostProcessingShaderConfigWidget::~PostProcessingShaderConfigWidget() = default; void PostProcessingShaderConfigWidget::updateConfigForOption(const PostProcessing::ShaderOption& option) { - const auto lock = Host::GetSettingsLock(); + auto lock = Host::GetSettingsLock(); SettingsInterface& si = m_widget->getSettingsInterfaceToUpdate(); PostProcessing::Config::SetStageOption(si, m_section, m_stage_index, option); + lock.unlock(); m_widget->commitSettingsUpdate(); } void PostProcessingShaderConfigWidget::onResetDefaultsClicked() { { - const auto lock = Host::GetSettingsLock(); + auto lock = Host::GetSettingsLock(); SettingsInterface& si = m_widget->getSettingsInterfaceToUpdate(); for (PostProcessing::ShaderOption& option : m_options) { @@ -303,6 +304,7 @@ void PostProcessingShaderConfigWidget::onResetDefaultsClicked() option.value = option.default_value; PostProcessing::Config::UnsetStageOption(si, m_section, m_stage_index, option); } + lock.unlock(); m_widget->commitSettingsUpdate(); }