Qt: Fix deadlock in Game Properties -> Post-Processing
This commit is contained in:
parent
90e9634c19
commit
5e21234966
|
@ -284,16 +284,17 @@ PostProcessingShaderConfigWidget::~PostProcessingShaderConfigWidget() = default;
|
||||||
|
|
||||||
void PostProcessingShaderConfigWidget::updateConfigForOption(const PostProcessing::ShaderOption& option)
|
void PostProcessingShaderConfigWidget::updateConfigForOption(const PostProcessing::ShaderOption& option)
|
||||||
{
|
{
|
||||||
const auto lock = Host::GetSettingsLock();
|
auto lock = Host::GetSettingsLock();
|
||||||
SettingsInterface& si = m_widget->getSettingsInterfaceToUpdate();
|
SettingsInterface& si = m_widget->getSettingsInterfaceToUpdate();
|
||||||
PostProcessing::Config::SetStageOption(si, m_section, m_stage_index, option);
|
PostProcessing::Config::SetStageOption(si, m_section, m_stage_index, option);
|
||||||
|
lock.unlock();
|
||||||
m_widget->commitSettingsUpdate();
|
m_widget->commitSettingsUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostProcessingShaderConfigWidget::onResetDefaultsClicked()
|
void PostProcessingShaderConfigWidget::onResetDefaultsClicked()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
const auto lock = Host::GetSettingsLock();
|
auto lock = Host::GetSettingsLock();
|
||||||
SettingsInterface& si = m_widget->getSettingsInterfaceToUpdate();
|
SettingsInterface& si = m_widget->getSettingsInterfaceToUpdate();
|
||||||
for (PostProcessing::ShaderOption& option : m_options)
|
for (PostProcessing::ShaderOption& option : m_options)
|
||||||
{
|
{
|
||||||
|
@ -303,6 +304,7 @@ void PostProcessingShaderConfigWidget::onResetDefaultsClicked()
|
||||||
option.value = option.default_value;
|
option.value = option.default_value;
|
||||||
PostProcessing::Config::UnsetStageOption(si, m_section, m_stage_index, option);
|
PostProcessing::Config::UnsetStageOption(si, m_section, m_stage_index, option);
|
||||||
}
|
}
|
||||||
|
lock.unlock();
|
||||||
m_widget->commitSettingsUpdate();
|
m_widget->commitSettingsUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue