Permalink
Browse files

Merge pull request #7194 from Techjar/qt-pp-state

Qt/EnhancementsWidget: Fix post-processing options not being disabled when they should
  • Loading branch information...
spycrab committed Jun 30, 2018
2 parents c1f404f + 68b8cd1 commit a4ef6f40d00c2aa63b0958f05999512443a280c2
Showing with 9 additions and 4 deletions.
  1. +9 −4 Source/Core/DolphinQt2/Config/Graphics/EnhancementsWidget.cpp
@@ -183,14 +183,18 @@ void EnhancementsWidget::LoadPPShaders()
m_pp_effect->setToolTip(supports_postprocessing ?
QStringLiteral("") :
tr("%1 doesn't support this feature.")
.arg(QString::fromStdString(g_video_backend->GetDisplayName())));
.arg(tr(g_video_backend->GetDisplayName().c_str())));
PostProcessingShaderConfiguration pp_shader;
if (selected_shader != "(off)")
if (selected_shader != "(off)" && supports_postprocessing)
{
pp_shader.LoadShader(selected_shader);
m_configure_pp_effect->setEnabled(pp_shader.HasOptions());
}
else
{
m_configure_pp_effect->setEnabled(false);
}
}
void EnhancementsWidget::LoadSettings()
@@ -254,8 +258,9 @@ void EnhancementsWidget::SaveSettings()
Config::SetBaseOrCurrent(Config::GFX_SSAA, is_ssaa);
Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER,
m_pp_effect->currentText().toStdString());
Config::SetBaseOrCurrent(
Config::GFX_ENHANCE_POST_SHADER,
m_pp_effect->currentIndex() == 0 ? "(off)" : m_pp_effect->currentText().toStdString());
PostProcessingShaderConfiguration pp_shader;
if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) != "(off)")

0 comments on commit a4ef6f4

Please sign in to comment.