From 0de31d87bdcb531ce7bca932b573824461611a6f Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 8 Sep 2017 01:13:23 +1000 Subject: [PATCH] VideoConfigDiag: Fix bug where postprocessing shader wasn't saved to INI --- Source/Core/DolphinWX/VideoConfigDiag.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index ad2ca9f52a..4461f6ec0e 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -1275,18 +1275,23 @@ void VideoConfigDiag::PopulatePostProcessingShaders() choice_ppshader->AppendString(StrToWxStr(shader)); } - if (!choice_ppshader->SetStringSelection(StrToWxStr(vconfig.sPostProcessingShader))) + if (vconfig.sPostProcessingShader.empty()) + { + // Select (off) value in choice. + choice_ppshader->Select(0); + } + else if (!choice_ppshader->SetStringSelection(StrToWxStr(vconfig.sPostProcessingShader))) { // Invalid shader, reset it to default choice_ppshader->Select(0); if (vconfig.iStereoMode == STEREO_ANAGLYPH) { - Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("dubois")); + Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("dubois")); choice_ppshader->SetStringSelection(StrToWxStr(vconfig.sPostProcessingShader)); } else - Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("")); + Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("")); } // Should the configuration button be loaded by default?