From 37276472ebd27df3b7bd4ac5a2154be493435881 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 19 Jan 2024 21:40:44 +1000 Subject: [PATCH] Qt: Tidy up Enhancement settings --- src/core/fullscreen_ui.cpp | 2 +- .../enhancementsettingswidget.cpp | 21 ++-- .../enhancementsettingswidget.h | 2 +- .../enhancementsettingswidget.ui | 116 +++++++++--------- 4 files changed, 74 insertions(+), 67 deletions(-) diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index ebedfbf82..33517e59b 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -3999,7 +3999,7 @@ void FullscreenUI::DrawDisplaySettingsPage() DrawToggleSetting(bsi, FSUI_CSTR("True Color Debanding"), FSUI_CSTR("Applies modern dithering techniques to further smooth out gradients when true color is enabled."), "GPU", - "Debanding", false, is_hardware); + "Debanding", false, is_hardware && bsi->GetBoolValue("GPU", "TrueColor", false)); DrawToggleSetting(bsi, FSUI_CSTR("Widescreen Hack"), FSUI_CSTR("Increases the field of view from 4:3 to the chosen display aspect ratio in 3D games."), diff --git a/src/duckstation-qt/enhancementsettingswidget.cpp b/src/duckstation-qt/enhancementsettingswidget.cpp index 0053037bf..c6594b22c 100644 --- a/src/duckstation-qt/enhancementsettingswidget.cpp +++ b/src/duckstation-qt/enhancementsettingswidget.cpp @@ -43,12 +43,12 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsWindow* dialog, QWi SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpCPU, "GPU", "PGXPCPU", false); connect(m_ui.resolutionScale, QOverload::of(&QComboBox::currentIndexChanged), this, - &EnhancementSettingsWidget::updateScaledDitheringEnabled); + &EnhancementSettingsWidget::onTrueColorChanged); connect(m_ui.gpuDownsampleMode, QOverload::of(&QComboBox::currentIndexChanged), this, &EnhancementSettingsWidget::updateDownsampleScaleVisible); - connect(m_ui.trueColor, &QCheckBox::stateChanged, this, &EnhancementSettingsWidget::updateScaledDitheringEnabled); + connect(m_ui.trueColor, &QCheckBox::stateChanged, this, &EnhancementSettingsWidget::onTrueColorChanged); updateDownsampleScaleVisible(); - updateScaledDitheringEnabled(); + onTrueColorChanged(); connect(m_ui.pgxpEnable, &QCheckBox::stateChanged, this, &EnhancementSettingsWidget::updatePGXPSettingsEnabled); connect(m_ui.pgxpTextureCorrection, &QCheckBox::stateChanged, this, @@ -63,7 +63,7 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsWindow* dialog, QWi tr("Selects the resolution scale that will be applied to the final image. 1x will " "downsample to the original console resolution.")); dialog->registerWidgetHelp( - m_ui.disableInterlacing, tr("Disable Interlacing (force progressive render/scan)"), tr("Unchecked"), + m_ui.disableInterlacing, tr("Disable Interlacing"), tr("Unchecked"), tr( "Forces the rendering and display of frames to progressive mode.
This removes the \"combing\" effect seen in " "480i games by rendering them in 480p. Usually safe to enable.
" @@ -74,7 +74,7 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsWindow* dialog, QWi "to the hardware backends.
This option is usually safe, with most games looking fine at " "higher resolutions. Higher resolutions require a more powerful GPU.")); dialog->registerWidgetHelp( - m_ui.trueColor, tr("True Color Rendering (24-bit, disables dithering)"), tr("Unchecked"), + m_ui.trueColor, tr("True Color Rendering"), tr("Unchecked"), tr("Forces the precision of colours output to the console's framebuffer to use the full 8 bits of precision per " "channel. This produces nicer looking gradients at the cost of making some colours look slightly different. " "Disabling the option also enables dithering, which makes the transition between colours less sharp by applying " @@ -83,10 +83,11 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsWindow* dialog, QWi dialog->registerWidgetHelp( m_ui.debanding, tr("True Color Debanding"), tr("Unchecked"), tr("Applies modern dithering techniques to further smooth out gradients when true color is enabled. " - "This debanding is performed during rendering (as opposed to a post-processing step), which allows it to be fast while preserving detail. " - "Debanding increases the file size of screenshots due to the subtle dithering pattern present in screenshots.")); + "This debanding is performed during rendering (as opposed to a post-processing step), which allows it to be " + "fast while preserving detail. " + "Debanding increases the file size of screenshots due to the subtle dithering pattern present in screenshots.")); dialog->registerWidgetHelp( - m_ui.scaledDithering, tr("Scaled Dithering (scale dither pattern to resolution)"), tr("Checked"), + m_ui.scaledDithering, tr("Scaled Dithering"), tr("Checked"), tr("Scales the dither pattern to the resolution scale of the emulated GPU. This makes the dither pattern much less " "obvious at higher resolutions.
Usually safe to enable, and only supported by the hardware renderers.")); dialog->registerWidgetHelp(m_ui.forceNTSCTimings, tr("Force NTSC Timings (60hz-on-PAL)"), tr("Unchecked"), @@ -145,12 +146,14 @@ EnhancementSettingsWidget::EnhancementSettingsWidget(SettingsWindow* dialog, QWi EnhancementSettingsWidget::~EnhancementSettingsWidget() = default; -void EnhancementSettingsWidget::updateScaledDitheringEnabled() +void EnhancementSettingsWidget::onTrueColorChanged() { const int resolution_scale = m_ui.resolutionScale->currentIndex(); const bool true_color = m_ui.trueColor->isChecked(); const bool allow_scaled_dithering = (resolution_scale != 1 && !true_color); + const bool allow_debanding = true_color; m_ui.scaledDithering->setEnabled(allow_scaled_dithering); + m_ui.debanding->setEnabled(allow_debanding); } void EnhancementSettingsWidget::updateDownsampleScaleVisible() diff --git a/src/duckstation-qt/enhancementsettingswidget.h b/src/duckstation-qt/enhancementsettingswidget.h index e8ca8a8bc..448956a3f 100644 --- a/src/duckstation-qt/enhancementsettingswidget.h +++ b/src/duckstation-qt/enhancementsettingswidget.h @@ -18,7 +18,7 @@ public: ~EnhancementSettingsWidget(); private Q_SLOTS: - void updateScaledDitheringEnabled(); + void onTrueColorChanged(); void updateDownsampleScaleVisible(); void updatePGXPSettingsEnabled(); diff --git a/src/duckstation-qt/enhancementsettingswidget.ui b/src/duckstation-qt/enhancementsettingswidget.ui index 8a4cc52a8..2ea47d4dc 100644 --- a/src/duckstation-qt/enhancementsettingswidget.ui +++ b/src/duckstation-qt/enhancementsettingswidget.ui @@ -6,8 +6,8 @@ 0 0 - 448 - 516 + 640 + 452 @@ -49,41 +49,6 @@ - - - - True Color Rendering (24-bit, disables dithering) - - - - - - - True Color Debanding - - - - - - - Scaled Dithering (scale dither pattern to resolution) - - - - - - - Widescreen Hack (render 3D in display aspect ratio) - - - - - - - Software Renderer Readbacks (run in parallel for VRAM->CPU transfers) - - - @@ -111,6 +76,52 @@ + + + + + + True Color Rendering + + + + + + + True Color Debanding + + + + + + + Scaled Dithering + + + + + + + Widescreen Hack + + + + + + + Software Renderer Readbacks + + + + + + + Disable Interlacing + + + + + @@ -119,32 +130,25 @@ Display Enhancements - - - - - Disable Interlacing (force progressive render/scan) - - - - - - - Force NTSC Timings (60hz-on-PAL) - - - - + + - Force 4:3 For 24-Bit Display (disable widescreen for FMVs) + Force 4:3 For FMVs - + - Chroma Smoothing For 24-Bit Display (reduce FMV color blockyness) + FMV Chroma Smoothing + + + + + + + Force NTSC Timings