Permalink
Browse files

Qt/EnhacementsWidget: Default anaglyph to "dubois"

  • Loading branch information...
spycrab committed May 26, 2018
1 parent 538aa31 commit 30aa291e837e5a32e59d53b5b69fdb91d59a5ec7
Showing with 13 additions and 2 deletions.
  1. +13 −2 Source/Core/DolphinQt2/Config/Graphics/EnhancementsWidget.cpp
@@ -146,24 +146,35 @@ void EnhancementsWidget::ConnectWidgets()
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);
m_pp_effect->clear();
m_pp_effect->addItem(tr("(off)"));
const auto selected_shader = Config::Get(Config::GFX_ENHANCE_POST_SHADER);
if (!anaglyph)
m_pp_effect->addItem(tr("(off)"));
auto selected_shader = Config::Get(Config::GFX_ENHANCE_POST_SHADER);
bool found = false;
for (const auto& shader : shaders)
{
m_pp_effect->addItem(QString::fromStdString(shader));
if (selected_shader == shader)
{
m_pp_effect->setCurrentIndex(m_pp_effect->count() - 1);
found = true;
}
}
if (anaglyph && !found)
m_pp_effect->setCurrentIndex(m_pp_effect->findText(QStringLiteral("dubois")));
const bool supports_postprocessing = g_Config.backend_info.bSupportsPostProcessing;
m_pp_effect->setEnabled(supports_postprocessing);

0 comments on commit 30aa291

Please sign in to comment.