Skip to content

Commit

Permalink
Qt: Fix deadlock in Game Properties -> Post-Processing
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 15, 2024
1 parent 90e9634 commit 5e21234
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/duckstation-qt/postprocessingsettingswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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();
}

Expand Down

0 comments on commit 5e21234

Please sign in to comment.