Merge pull request #7749 from jordan-woyak/fix-anaglyph-pp-selection

DolphinQt: Fix selection of PP shader when using anaglyph 3D.
This commit is contained in:
Connor McLaughlin 2019-01-28 11:01:17 +10:00 committed by GitHub
commit 84794a6f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 7 deletions

View File

@ -153,10 +153,9 @@ void EnhancementsWidget::LoadPPShaders()
{
const bool anaglyph = g_Config.stereo_mode == StereoMode::Anaglyph;
std::vector<std::string> shaders =
g_Config.stereo_mode == StereoMode::Anaglyph ?
PostProcessingShaderImplementation::GetAnaglyphShaderList(
g_Config.backend_info.api_type) :
PostProcessingShaderImplementation::GetShaderList(g_Config.backend_info.api_type);
anaglyph ? PostProcessingShaderImplementation::GetAnaglyphShaderList(
g_Config.backend_info.api_type) :
PostProcessingShaderImplementation::GetShaderList(g_Config.backend_info.api_type);
m_pp_effect->clear();
@ -261,9 +260,11 @@ void EnhancementsWidget::SaveSettings()
Config::SetBaseOrCurrent(Config::GFX_SSAA, is_ssaa);
Config::SetBaseOrCurrent(
Config::GFX_ENHANCE_POST_SHADER,
m_pp_effect->currentIndex() == 0 ? "(off)" : m_pp_effect->currentText().toStdString());
const bool anaglyph = g_Config.stereo_mode == StereoMode::Anaglyph;
Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER,
(!anaglyph && m_pp_effect->currentIndex() == 0) ?
"(off)" :
m_pp_effect->currentText().toStdString());
PostProcessingShaderConfiguration pp_shader;
if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) != "(off)")