From f67d80c7c1e442c058b502477b98bbecd14b4a47 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Thu, 23 Apr 2026 12:22:43 -0700 Subject: [PATCH] VideoConfig: Rename StereoMode::TAB to StereoMode::TopAndBottom --- .../DolphinQt/Config/Graphics/EnhancementsWidget.cpp | 12 ++++++++++-- Source/Core/DolphinQt/HotkeyScheduler.cpp | 4 ++-- Source/Core/VideoCommon/PostProcessing.cpp | 2 +- Source/Core/VideoCommon/Present.cpp | 8 ++++---- Source/Core/VideoCommon/VideoConfig.h | 2 +- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp index ccbade9da0..228cc348a8 100644 --- a/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp @@ -241,8 +241,11 @@ void EnhancementsWidget::CreateWidgets() m_3d_convergence_value->setText(QString::asprintf("%.2f", m_3d_convergence->GetValue())); auto current_stereo_mode = Get(m_game_layer, Config::GFX_STEREO_MODE); - if (current_stereo_mode != StereoMode::SideBySide && current_stereo_mode != StereoMode::TAB) + if (current_stereo_mode != StereoMode::SideBySide && + current_stereo_mode != StereoMode::TopAndBottom) + { m_3d_per_eye_resolution->hide(); + } main_layout->addWidget(enhancements_box); main_layout->addWidget(stereoscopy_box); @@ -257,10 +260,15 @@ void EnhancementsWidget::ConnectWidgets() auto current_stereo_mode = Get(m_game_layer, Config::GFX_STEREO_MODE); LoadPostProcessingShaders(); - if (current_stereo_mode == StereoMode::SideBySide || current_stereo_mode == StereoMode::TAB) + if (current_stereo_mode == StereoMode::SideBySide || + current_stereo_mode == StereoMode::TopAndBottom) + { m_3d_per_eye_resolution->show(); + } else + { m_3d_per_eye_resolution->hide(); + } }); connect(m_post_processing_effect, &QComboBox::currentIndexChanged, this, diff --git a/Source/Core/DolphinQt/HotkeyScheduler.cpp b/Source/Core/DolphinQt/HotkeyScheduler.cpp index d26b3f0093..8e4f5261dc 100644 --- a/Source/Core/DolphinQt/HotkeyScheduler.cpp +++ b/Source/Core/DolphinQt/HotkeyScheduler.cpp @@ -569,13 +569,13 @@ void HotkeyScheduler::Run() if (IsHotkey(HK_TOGGLE_STEREO_TOP_AND_BOTTOM)) { - if (Config::Get(Config::GFX_STEREO_MODE) != StereoMode::TAB) + if (Config::Get(Config::GFX_STEREO_MODE) != StereoMode::TopAndBottom) { // Disable post-processing shader, as stereoscopy itself is currently a shader if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) == DUBOIS_ALGORITHM_SHADER) Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, ""); - Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::TAB); + Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::TopAndBottom); } else { diff --git a/Source/Core/VideoCommon/PostProcessing.cpp b/Source/Core/VideoCommon/PostProcessing.cpp index 1f7e2aa987..92f7c1f99c 100644 --- a/Source/Core/VideoCommon/PostProcessing.cpp +++ b/Source/Core/VideoCommon/PostProcessing.cpp @@ -1018,7 +1018,7 @@ static bool UseGeometryShaderForPostProcess(bool is_intermediary_buffer) case StereoMode::Passive: return is_intermediary_buffer; case StereoMode::SideBySide: - case StereoMode::TAB: + case StereoMode::TopAndBottom: case StereoMode::Off: default: return false; diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp index d74752a2fd..0691323c54 100644 --- a/Source/Core/VideoCommon/Present.cpp +++ b/Source/Core/VideoCommon/Present.cpp @@ -392,7 +392,7 @@ Presenter::ConvertStereoRectangle(const MathUtil::Rectangle& rc) const { // Resize target to half its original size auto draw_rc = rc; - if (g_ActiveConfig.stereo_mode == StereoMode::TAB) + if (g_ActiveConfig.stereo_mode == StereoMode::TopAndBottom) { // The height may be negative due to flipped rectangles int height = rc.bottom - rc.top; @@ -409,7 +409,7 @@ Presenter::ConvertStereoRectangle(const MathUtil::Rectangle& rc) const // Create two target rectangle offset to the sides of the backbuffer auto left_rc = draw_rc; auto right_rc = draw_rc; - if (g_ActiveConfig.stereo_mode == StereoMode::TAB) + if (g_ActiveConfig.stereo_mode == StereoMode::TopAndBottom) { left_rc.top -= m_backbuffer_height / 4; left_rc.bottom -= m_backbuffer_height / 4; @@ -483,7 +483,7 @@ float Presenter::CalculateDrawAspectRatio(bool allow_stretch) const // resolution resulting_aspect_ratio *= 2.0; } - else if (g_ActiveConfig.stereo_mode == StereoMode::TAB) + else if (g_ActiveConfig.stereo_mode == StereoMode::TopAndBottom) { // Render twice as tall if using top-and-bottom 3D, since the 3D will halve the vertical // resolution @@ -831,7 +831,7 @@ void Presenter::RenderXFBToScreen(const MathUtil::Rectangle& target_rc, g_gfx->SelectMainBuffer(); } else if (g_ActiveConfig.stereo_mode == StereoMode::SideBySide || - g_ActiveConfig.stereo_mode == StereoMode::TAB) + g_ActiveConfig.stereo_mode == StereoMode::TopAndBottom) { const auto [left_rc, right_rc] = ConvertStereoRectangle(target_rc); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 21d20428d8..eed6a3420e 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -34,7 +34,7 @@ enum class StereoMode : int { Off, SideBySide, - TAB, + TopAndBottom, Anaglyph, QuadBuffer, Passive