From c0211654836445e0c9f97f8b28eda5aee4744994 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Fri, 19 Jul 2024 19:46:28 +0200 Subject: [PATCH] Disable stereo render combobox if other resolutions than 720p are selected Also move to custom configuration --- rpcs3/rpcs3qt/settings_dialog.cpp | 27 +++++++++++++++++++-------- rpcs3/rpcs3qt/tooltips.h | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index e7cb377cb4..a9adcb8254 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -588,14 +588,10 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std switch (static_cast(ui->zcullPrecisionMode->itemData(index).toInt())) { - case zcull_precision_level::precise: - precise = true; break; - case zcull_precision_level::approximate: - break; - case zcull_precision_level::relaxed: - relaxed = true; break; - default: - fmt::throw_exception("Unexpected selection"); + case zcull_precision_level::precise: precise = true; break; + case zcull_precision_level::approximate: break; + case zcull_precision_level::relaxed: relaxed = true; break; + default: fmt::throw_exception("Unexpected selection"); } m_emu_settings->SetSetting(emu_settings_type::RelaxedZCULL, relaxed ? "true" : "false"); @@ -609,6 +605,21 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // 3D m_emu_settings->EnhanceComboBox(ui->stereoRenderMode, emu_settings_type::StereoRenderMode); SubscribeTooltip(ui->gb_stereo, tooltips.settings.stereo_render_mode); + if (game) + { + const auto on_resolution = [this](int index) + { + const auto [text, value] = get_data(ui->resBox, index); + ui->stereoRenderMode->setEnabled(value == static_cast(video_resolution::_720p)); + }; + connect(ui->resBox, QOverload::of(&QComboBox::currentIndexChanged), this, on_resolution); + on_resolution(ui->resBox->currentIndex()); + } + else + { + ui->stereoRenderMode->setCurrentIndex(find_item(ui->stereoRenderMode, static_cast(g_cfg.video.stereo_render_mode.def))); + ui->stereoRenderMode->setEnabled(false); + } // Checkboxes: main options m_emu_settings->EnhanceCheckBox(ui->dumpColor, emu_settings_type::WriteColorBuffers); diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index cf69a5eb5f..0b7c4fb815 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -118,7 +118,7 @@ public: const QString disable_fifo_reordering = tr("Disables RSX FIFO optimizations completely. Draws are processed as they are received by the DMA puller."); const QString gpu_texture_scaling = tr("Force all texture transfer, scaling and conversion operations on the GPU.\nMay cause texture corruption in some cases."); const QString strict_texture_flushing = tr("Forces texture flushing even in situations where it is not necessary/correct. Known to cause visual artifacts, but useful for debugging certain texture cache issues."); - const QString stereo_render_mode = tr("Sets the 3D stereo rendering mode.\nAnaglyph uses different colors for each eye, which can then be filtered with certain glasses.\nSide-by-Side is more commonly supported by VR viewer apps.\nOver-Under is closer to the native stereo output, but less commonly supported."); + const QString stereo_render_mode = tr("Sets the 3D stereo rendering mode (only available in custom configurations with a default resolution of 720p).\nAnaglyph uses different colors for each eye, which can then be filtered with certain glasses.\nSide-by-Side is more commonly supported by VR viewer apps.\nOver-Under is closer to the native stereo output, but less commonly supported."); const QString accurate_ppu_128_loop = tr("When enabled, PPU atomic operations will operate on entire cache line data, as opposed to a single 64bit block of memory when disabled.\nNumerical values control whether or not to enable the accurate version based on the atomic operation's length."); const QString enable_performance_report = tr("Measure certain events and print a chart after the emulator is stopped. Don't enable if not asked to."); const QString num_ppu_threads = tr("Affects maximum amount of PPU threads running concurrently, the value of 1 has very low compatibility with games.\n2 is the default, if unsure do not modify this setting.");