Qt/EnhancementsWidget: Add missing anaglyph options

This commit is contained in:
spycrab 2018-05-25 21:25:01 +02:00
parent 157e263e05
commit 928a64dc6a
1 changed files with 14 additions and 5 deletions

View File

@ -24,8 +24,6 @@
#include "VideoCommon/PostProcessing.h"
#include "VideoCommon/VideoConfig.h"
constexpr const char* DUBOIS_ALGORITHM_SHADER = "dubois";
EnhancementsWidget::EnhancementsWidget(GraphicsWindow* parent)
: GraphicsWidget(parent), m_block_save(false)
{
@ -104,9 +102,9 @@ void EnhancementsWidget::CreateWidgets()
auto* stereoscopy_layout = new QGridLayout();
stereoscopy_box->setLayout(stereoscopy_layout);
m_3d_mode =
new GraphicsChoice({tr("Off"), tr("Side-by-Side"), tr("Top-and-Bottom"), tr("Anaglyph")},
Config::GFX_STEREO_MODE);
m_3d_mode = new GraphicsChoice(
{tr("Off"), tr("Side-by-Side"), tr("Top-and-Bottom"), tr("Anaglyph"), tr("HDMI 3D")},
Config::GFX_STEREO_MODE);
m_3d_depth = new GraphicsSlider(0, 100, Config::GFX_STEREO_DEPTH);
m_3d_convergence = new GraphicsSlider(0, 200, Config::GFX_STEREO_CONVERGENCE, 100);
m_3d_swap_eyes = new GraphicsBool(tr("Swap Eyes"), Config::GFX_STEREO_SWAP_EYES);
@ -200,7 +198,18 @@ void EnhancementsWidget::LoadSettings()
// Post Processing Shader
LoadPPShaders();
// Stereoscopy
bool supports_stereoscopy = g_Config.backend_info.bSupportsGeometryShaders;
bool supports_3dvision = g_Config.backend_info.bSupports3DVision;
bool has_3dvision = m_3d_mode->count() == 6;
if (has_3dvision && !supports_3dvision)
m_3d_mode->removeItem(4);
if (!has_3dvision && supports_3dvision)
m_3d_mode->addItem(tr("NVIDIA 3D Vision"));
m_3d_mode->setEnabled(supports_stereoscopy);
m_3d_convergence->setEnabled(supports_stereoscopy);