Qt: Fix deadlock in Game Properties -> Post-Processing

This commit is contained in:
Stenzek 2024-12-15 12:59:30 +10:00
parent 90e9634c19
commit 5e21234966
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -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();
}