diff --git a/src/duckstation-qt/CMakeLists.txt b/src/duckstation-qt/CMakeLists.txt index 5a5d186ce..7a156faf5 100644 --- a/src/duckstation-qt/CMakeLists.txt +++ b/src/duckstation-qt/CMakeLists.txt @@ -20,6 +20,12 @@ set(SRCS consolesettingswidget.ui controllersettingswidget.cpp controllersettingswidget.h + displaysettingswidget.cpp + displaysettingswidget.h + displaysettingswidget.ui + enhancementsettingswidget.cpp + enhancementsettingswidget.h + enhancementsettingswidget.ui gamelistmodel.cpp gamelistmodel.h gamelistsearchdirectoriesmodel.cpp @@ -35,9 +41,6 @@ set(SRCS generalsettingswidget.cpp generalsettingswidget.h generalsettingswidget.ui - gpusettingswidget.cpp - gpusettingswidget.h - gpusettingswidget.ui hotkeysettingswidget.cpp hotkeysettingswidget.h inputbindingdialog.cpp diff --git a/src/duckstation-qt/gpusettingswidget.cpp b/src/duckstation-qt/displaysettingswidget.cpp similarity index 52% rename from src/duckstation-qt/gpusettingswidget.cpp rename to src/duckstation-qt/displaysettingswidget.cpp index dc64c8118..7946140ca 100644 --- a/src/duckstation-qt/gpusettingswidget.cpp +++ b/src/duckstation-qt/displaysettingswidget.cpp @@ -1,4 +1,4 @@ -#include "gpusettingswidget.h" +#include "displaysettingswidget.h" #include "core/gpu.h" #include "core/settings.h" #include "qtutils.h" @@ -11,7 +11,7 @@ #include "frontend-common/d3d11_host_display.h" #endif -GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog) +DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog) : QWidget(parent), m_host_interface(host_interface) { m_ui.setupUi(this); @@ -31,32 +31,18 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayIntegerScaling, "Display", "IntegerScaling"); SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.vsync, "Display", "VSync"); - SettingWidgetBinder::BindWidgetToIntSetting(m_host_interface, m_ui.resolutionScale, "GPU", "ResolutionScale"); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.trueColor, "GPU", "TrueColor"); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.scaledDithering, "GPU", "ScaledDithering"); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.disableInterlacing, "GPU", "DisableInterlacing"); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.forceNTSCTimings, "GPU", "ForceNTSCTimings"); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.linearTextureFiltering, "GPU", - "TextureFiltering"); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.widescreenHack, "GPU", "WidescreenHack"); - - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpEnable, "GPU", "PGXPEnable", false); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpCulling, "GPU", "PGXPCulling", true); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpTextureCorrection, "GPU", - "PGXPTextureCorrection", true); - - connect(m_ui.resolutionScale, QOverload::of(&QComboBox::currentIndexChanged), this, - &GPUSettingsWidget::updateScaledDitheringEnabled); - connect(m_ui.trueColor, &QCheckBox::stateChanged, this, &GPUSettingsWidget::updateScaledDitheringEnabled); - updateScaledDitheringEnabled(); - - connect(m_ui.pgxpEnable, &QCheckBox::stateChanged, this, &GPUSettingsWidget::updatePGXPSettingsEnabled); - updatePGXPSettingsEnabled(); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showOSDMessages, "Display", "ShowOSDMessages", + true); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showFPS, "Display", "ShowFPS", false); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showVPS, "Display", "ShowVPS", false); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showSpeed, "Display", "ShowSpeed", false); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showResolution, "Display", "ShowResolution", + false); connect(m_ui.renderer, QOverload::of(&QComboBox::currentIndexChanged), this, - &GPUSettingsWidget::populateGPUAdapters); + &DisplaySettingsWidget::populateGPUAdapters); connect(m_ui.adapter, QOverload::of(&QComboBox::currentIndexChanged), this, - &GPUSettingsWidget::onGPUAdapterIndexChanged); + &DisplaySettingsWidget::onGPUAdapterIndexChanged); populateGPUAdapters(); dialog->registerWidgetHelp( @@ -80,12 +66,6 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p "Some games display content in the overscan area, or use it for screen effects.
May " "not display correctly with the \"All Borders\" setting. \"Only Overscan\" offers a good " "compromise between stability and hiding black borders.")); - dialog->registerWidgetHelp( - m_ui.disableInterlacing, tr("Disable Interlacing (force progressive render/scan)"), 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.
" - "May not be compatible with all games.")); dialog->registerWidgetHelp(m_ui.displayLinearFiltering, tr("Linear Upscaling"), tr("Checked"), tr("Uses bilinear texture filtering when displaying the console's framebuffer to the " "screen.
Disabling filtering " @@ -100,61 +80,22 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p m_ui.vsync, tr("VSync"), tr("Checked"), tr("Enable this option to match DuckStation's refresh rate with your current monitor or screen. " "VSync is automatically disabled when it is not possible (e.g. running at non-100% speed).")); + dialog->registerWidgetHelp(m_ui.showOSDMessages, tr("Show OSD Messages"), tr("Checked"), + tr("Shows on-screen-display messages when events occur such as save states being " + "created/loaded, screenshots being taken, etc.")); + dialog->registerWidgetHelp(m_ui.showFPS, tr("Show FPS"), tr("Unchecked"), + tr("Shows the internal frame rate of the game in the top-right corner of the display.")); + dialog->registerWidgetHelp(m_ui.showVPS, tr("Show VPS"), tr("Unchecked"), + tr("Shows the number of frames (or v-syncs) displayed per second by the system in the " + "top-right corner of the display.")); dialog->registerWidgetHelp( - m_ui.resolutionScale, tr("Resolution Scale"), "1x", - tr("Setting this beyond 1x will enhance the resolution of rendered 3D polygons and lines. Only applies " - "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"), - 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 " - "a pattern around those pixels. Most games are compatible with this option, but there is a number which aren't " - "and will have broken effects with it enabled. Only applies to the hardware renderers.")); - dialog->registerWidgetHelp( - m_ui.scaledDithering, tr("Scaled Dithering (scale dither pattern to resolution)"), 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"), - tr("Uses NTSC frame timings when the console is in PAL mode, forcing PAL games to run at " - "60hz.
For most games which " - "have a speed tied to the framerate, this will result in the game running " - "approximately 17% faster.
For variable " - "frame rate games, it may not affect the speed.")); - dialog->registerWidgetHelp( - m_ui.linearTextureFiltering, tr("Bilinear Texture Filtering"), tr("Unchecked"), - tr("Smooths out the blockyness of magnified textures on 3D object by using bilinear filtering.
Will have a " - "greater effect on higher resolution scales. Only applies to the hardware renderers.")); - dialog->registerWidgetHelp( - m_ui.widescreenHack, tr("Widescreen Hack"), tr("Unchecked"), - tr("Scales vertex positions in screen-space to a widescreen aspect ratio, essentially " - "increasing the field of view from 4:3 to 16:9 in 3D games.
For 2D games, or games which " - "use pre-rendered backgrounds, this enhancement will not work as expected.
May not be compatible with " - "all games.")); - dialog->registerWidgetHelp( - m_ui.pgxpEnable, tr("Geometry Correction"), tr("Unchecked"), - tr("Reduces \"wobbly\" polygons and \"warping\" textures that are common in PS1 games.
Only " - "works with the hardware renderers. May not be compatible with all games.")); - dialog->registerWidgetHelp(m_ui.pgxpCulling, tr("Culling Correction"), tr("Checked"), - tr("Increases the precision of polygon culling, reducing the number of holes in geometry. " - "Requires geometry correction enabled.")); - dialog->registerWidgetHelp(m_ui.pgxpTextureCorrection, tr("Texture Correction"), tr("Checked"), - tr("Uses perspective-correct interpolation for texture coordinates and colors, " - "straightening out warped textures. Requires geometry correction enabled.")); + m_ui.showSpeed, tr("Show Speed"), tr("Unchecked"), + tr("Shows the current emulation speed of the system in the top-right corner of the display as a percentage.")); } -GPUSettingsWidget::~GPUSettingsWidget() = default; +DisplaySettingsWidget::~DisplaySettingsWidget() = default; -void GPUSettingsWidget::updateScaledDitheringEnabled() -{ - 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); - m_ui.scaledDithering->setEnabled(allow_scaled_dithering); -} - -void GPUSettingsWidget::setupAdditionalUi() +void DisplaySettingsWidget::setupAdditionalUi() { for (u32 i = 0; i < static_cast(GPURenderer::Count); i++) { @@ -173,11 +114,9 @@ void GPUSettingsWidget::setupAdditionalUi() m_ui.displayCropMode->addItem( qApp->translate("DisplayCropMode", Settings::GetDisplayCropModeDisplayName(static_cast(i)))); } - - QtUtils::FillComboBoxWithResolutionScales(m_ui.resolutionScale); } -void GPUSettingsWidget::populateGPUAdapters() +void DisplaySettingsWidget::populateGPUAdapters() { std::vector adapter_names; switch (static_cast(m_ui.renderer->currentIndex())) @@ -218,7 +157,7 @@ void GPUSettingsWidget::populateGPUAdapters() m_ui.adapter->setEnabled(!adapter_names.empty()); } -void GPUSettingsWidget::onGPUAdapterIndexChanged() +void DisplaySettingsWidget::onGPUAdapterIndexChanged() { if (m_ui.adapter->currentIndex() == 0) { @@ -229,10 +168,3 @@ void GPUSettingsWidget::onGPUAdapterIndexChanged() m_host_interface->SetStringSettingValue("GPU", "Adapter", m_ui.adapter->currentText().toUtf8().constData()); } - -void GPUSettingsWidget::updatePGXPSettingsEnabled() -{ - const bool enabled = m_ui.pgxpEnable->isChecked(); - m_ui.pgxpCulling->setEnabled(enabled); - m_ui.pgxpTextureCorrection->setEnabled(enabled); -} diff --git a/src/duckstation-qt/displaysettingswidget.h b/src/duckstation-qt/displaysettingswidget.h new file mode 100644 index 000000000..9a941ace1 --- /dev/null +++ b/src/duckstation-qt/displaysettingswidget.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +#include "ui_displaysettingswidget.h" + +class QtHostInterface; +class SettingsDialog; + +class DisplaySettingsWidget : public QWidget +{ + Q_OBJECT + +public: + DisplaySettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog); + ~DisplaySettingsWidget(); + +private Q_SLOTS: + void populateGPUAdapters(); + void onGPUAdapterIndexChanged(); + +private: + void setupAdditionalUi(); + + Ui::DisplaySettingsWidget m_ui; + + QtHostInterface* m_host_interface; +}; diff --git a/src/duckstation-qt/displaysettingswidget.ui b/src/duckstation-qt/displaysettingswidget.ui new file mode 100644 index 000000000..22a5eb30b --- /dev/null +++ b/src/duckstation-qt/displaysettingswidget.ui @@ -0,0 +1,169 @@ + + + DisplaySettingsWidget + + + + 0 + 0 + 448 + 720 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Basic + + + + + + Renderer: + + + + + + + + + + Adapter: + + + + + + + + + + + + + Screen Display + + + + + + Aspect Ratio: + + + + + + + + + + Crop: + + + + + + + + + + Linear Upscaling + + + + + + + Integer Upscaling + + + + + + + VSync + + + + + + + + + + On-Screen Display + + + + + + Show Messages + + + + + + + Show FPS + + + + + + + Show Emulation Speed + + + + + + + Show VPS + + + + + + + Show Resolution + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + diff --git a/src/duckstation-qt/duckstation-qt.vcxproj b/src/duckstation-qt/duckstation-qt.vcxproj index 29441b4f3..ad2d52bf4 100644 --- a/src/duckstation-qt/duckstation-qt.vcxproj +++ b/src/duckstation-qt/duckstation-qt.vcxproj @@ -40,10 +40,11 @@ + - + @@ -64,10 +65,11 @@ + - + @@ -117,6 +119,9 @@ Document + + Document + Document @@ -129,7 +134,7 @@ Document - + Document @@ -151,13 +156,14 @@ + - + diff --git a/src/duckstation-qt/enhancementsettingswidget.cpp b/src/duckstation-qt/enhancementsettingswidget.cpp new file mode 100644 index 000000000..c00cbf6aa --- /dev/null +++ b/src/duckstation-qt/enhancementsettingswidget.cpp @@ -0,0 +1,106 @@ +#include "enhancementsettingswidget.h" +#include "core/gpu.h" +#include "core/settings.h" +#include "qtutils.h" +#include "settingsdialog.h" +#include "settingwidgetbinder.h" + +EnhancementSettingsWidget::EnhancementSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog) + : QWidget(parent), m_host_interface(host_interface) +{ + m_ui.setupUi(this); + setupAdditionalUi(); + + SettingWidgetBinder::BindWidgetToIntSetting(m_host_interface, m_ui.resolutionScale, "GPU", "ResolutionScale"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.trueColor, "GPU", "TrueColor"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.scaledDithering, "GPU", "ScaledDithering"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.disableInterlacing, "GPU", "DisableInterlacing"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.forceNTSCTimings, "GPU", "ForceNTSCTimings"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.linearTextureFiltering, "GPU", + "TextureFiltering"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.widescreenHack, "GPU", "WidescreenHack"); + + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpEnable, "GPU", "PGXPEnable", false); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpCulling, "GPU", "PGXPCulling", true); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pgxpTextureCorrection, "GPU", + "PGXPTextureCorrection", true); + + connect(m_ui.resolutionScale, QOverload::of(&QComboBox::currentIndexChanged), this, + &EnhancementSettingsWidget::updateScaledDitheringEnabled); + connect(m_ui.trueColor, &QCheckBox::stateChanged, this, &EnhancementSettingsWidget::updateScaledDitheringEnabled); + updateScaledDitheringEnabled(); + + connect(m_ui.pgxpEnable, &QCheckBox::stateChanged, this, &EnhancementSettingsWidget::updatePGXPSettingsEnabled); + updatePGXPSettingsEnabled(); + + dialog->registerWidgetHelp( + m_ui.disableInterlacing, tr("Disable Interlacing (force progressive render/scan)"), 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.
" + "May not be compatible with all games.")); + dialog->registerWidgetHelp( + m_ui.resolutionScale, tr("Resolution Scale"), "1x", + tr("Setting this beyond 1x will enhance the resolution of rendered 3D polygons and lines. Only applies " + "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"), + 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 " + "a pattern around those pixels. Most games are compatible with this option, but there is a number which aren't " + "and will have broken effects with it enabled. Only applies to the hardware renderers.")); + dialog->registerWidgetHelp( + m_ui.scaledDithering, tr("Scaled Dithering (scale dither pattern to resolution)"), 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"), + tr("Uses NTSC frame timings when the console is in PAL mode, forcing PAL games to run at " + "60hz.
For most games which " + "have a speed tied to the framerate, this will result in the game running " + "approximately 17% faster.
For variable " + "frame rate games, it may not affect the speed.")); + dialog->registerWidgetHelp( + m_ui.linearTextureFiltering, tr("Bilinear Texture Filtering"), tr("Unchecked"), + tr("Smooths out the blockyness of magnified textures on 3D object by using bilinear filtering.
Will have a " + "greater effect on higher resolution scales. Only applies to the hardware renderers.")); + dialog->registerWidgetHelp( + m_ui.widescreenHack, tr("Widescreen Hack"), tr("Unchecked"), + tr("Scales vertex positions in screen-space to a widescreen aspect ratio, essentially " + "increasing the field of view from 4:3 to 16:9 in 3D games.
For 2D games, or games which " + "use pre-rendered backgrounds, this enhancement will not work as expected.
May not be compatible with " + "all games.")); + dialog->registerWidgetHelp( + m_ui.pgxpEnable, tr("Geometry Correction"), tr("Unchecked"), + tr("Reduces \"wobbly\" polygons and \"warping\" textures that are common in PS1 games.
Only " + "works with the hardware renderers. May not be compatible with all games.")); + dialog->registerWidgetHelp(m_ui.pgxpCulling, tr("Culling Correction"), tr("Checked"), + tr("Increases the precision of polygon culling, reducing the number of holes in geometry. " + "Requires geometry correction enabled.")); + dialog->registerWidgetHelp(m_ui.pgxpTextureCorrection, tr("Texture Correction"), tr("Checked"), + tr("Uses perspective-correct interpolation for texture coordinates and colors, " + "straightening out warped textures. Requires geometry correction enabled.")); +} + +EnhancementSettingsWidget::~EnhancementSettingsWidget() = default; + +void EnhancementSettingsWidget::updateScaledDitheringEnabled() +{ + 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); + m_ui.scaledDithering->setEnabled(allow_scaled_dithering); +} + +void EnhancementSettingsWidget::setupAdditionalUi() +{ + QtUtils::FillComboBoxWithResolutionScales(m_ui.resolutionScale); +} + +void EnhancementSettingsWidget::updatePGXPSettingsEnabled() +{ + const bool enabled = m_ui.pgxpEnable->isChecked(); + m_ui.pgxpCulling->setEnabled(enabled); + m_ui.pgxpTextureCorrection->setEnabled(enabled); +} diff --git a/src/duckstation-qt/enhancementsettingswidget.h b/src/duckstation-qt/enhancementsettingswidget.h new file mode 100644 index 000000000..2d9b7e193 --- /dev/null +++ b/src/duckstation-qt/enhancementsettingswidget.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +#include "ui_enhancementsettingswidget.h" + +class QtHostInterface; +class SettingsDialog; + +class EnhancementSettingsWidget : public QWidget +{ + Q_OBJECT + +public: + EnhancementSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog); + ~EnhancementSettingsWidget(); + +private Q_SLOTS: + void updateScaledDitheringEnabled(); + void updatePGXPSettingsEnabled(); + +private: + void setupAdditionalUi(); + + Ui::EnhancementSettingsWidget m_ui; + + QtHostInterface* m_host_interface; +}; diff --git a/src/duckstation-qt/gpusettingswidget.ui b/src/duckstation-qt/enhancementsettingswidget.ui similarity index 57% rename from src/duckstation-qt/gpusettingswidget.ui rename to src/duckstation-qt/enhancementsettingswidget.ui index f4e8b4b4b..c3d556433 100644 --- a/src/duckstation-qt/gpusettingswidget.ui +++ b/src/duckstation-qt/enhancementsettingswidget.ui @@ -1,7 +1,7 @@ - GPUSettingsWidget - + EnhancementSettingsWidget + 0 @@ -26,110 +26,16 @@ 0 - - - - true - - - - - 0 - 0 - 423 - 756 - - - - - - - Basic - - - - - - Renderer: - - - - - - - - - - Adapter: - - - - - - - - - - - - - Screen Display - - - - - - Aspect Ratio: - - - - - - - - - - Crop: - - - - - - - - - - Linear Upscaling - - - - - - - Integer Upscaling - - - - - - - VSync - - - - - - - Enhancements + Rendering Enhancements - Resolution Scale: + Internal Resolution Scale: @@ -151,27 +57,36 @@ - - - Disable Interlacing (force progressive render/scan) - - - - - - - Force NTSC Timings (60hz-on-PAL) - - - - Bilinear Texture Filtering - + + + + + + + Display Enhancements + + + + + + Disable Interlacing (force progressive render/scan) + + + + + + + Force NTSC Timings (60hz-on-PAL) + + + + Widescreen Hack @@ -184,7 +99,7 @@ - PGXP + PGXP (Precision Geometry Transform Pipeline) @@ -224,10 +139,6 @@ - - - - diff --git a/src/duckstation-qt/generalsettingswidget.cpp b/src/duckstation-qt/generalsettingswidget.cpp index d6c0b53e6..cf165f7b9 100644 --- a/src/duckstation-qt/generalsettingswidget.cpp +++ b/src/duckstation-qt/generalsettingswidget.cpp @@ -25,15 +25,7 @@ GeneralSettingsWidget::GeneralSettingsWidget(QtHostInterface* host_interface, QW "LoadDevicesFromSaveStates", false); SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.applyGameSettings, "Main", "ApplyGameSettings", true); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.autoLoadCheats, "Main", "AutoLoadCheats", - false); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showOSDMessages, "Display", "ShowOSDMessages", - true); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showFPS, "Display", "ShowFPS", false); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showVPS, "Display", "ShowVPS", false); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showSpeed, "Display", "ShowSpeed", false); - SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showResolution, "Display", "ShowResolution", - false); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.autoLoadCheats, "Main", "AutoLoadCheats", false); SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.enableSpeedLimiter, "Main", "SpeedLimiterEnabled", true); @@ -88,17 +80,6 @@ GeneralSettingsWidget::GeneralSettingsWidget(QtHostInterface* host_interface, QW m_ui.emulationSpeed, tr("Emulation Speed"), "100%", tr("Sets the target emulation speed. It is not guaranteed that this speed will be reached, " "and if not, the emulator will run as fast as it can manage.")); - dialog->registerWidgetHelp(m_ui.showOSDMessages, tr("Show OSD Messages"), tr("Checked"), - tr("Shows on-screen-display messages when events occur such as save states being " - "created/loaded, screenshots being taken, etc.")); - dialog->registerWidgetHelp(m_ui.showFPS, tr("Show FPS"), tr("Unchecked"), - tr("Shows the internal frame rate of the game in the top-right corner of the display.")); - dialog->registerWidgetHelp(m_ui.showVPS, tr("Show VPS"), tr("Unchecked"), - tr("Shows the number of frames (or v-syncs) displayed per second by the system in the " - "top-right corner of the display.")); - dialog->registerWidgetHelp( - m_ui.showSpeed, tr("Show Speed"), tr("Unchecked"), - tr("Shows the current emulation speed of the system in the top-right corner of the display as a percentage.")); dialog->registerWidgetHelp(m_ui.controllerBackend, tr("Controller Backend"), qApp->translate("ControllerInterface", ControllerInterface::GetBackendName( ControllerInterface::GetDefaultBackend())), diff --git a/src/duckstation-qt/generalsettingswidget.ui b/src/duckstation-qt/generalsettingswidget.ui index 6c10f087a..8601bae93 100644 --- a/src/duckstation-qt/generalsettingswidget.ui +++ b/src/duckstation-qt/generalsettingswidget.ui @@ -153,50 +153,6 @@ - - - - On-Screen Display - - - - - - Show Messages - - - - - - - Show FPS - - - - - - - Show Emulation Speed - - - - - - - Show VPS - - - - - - - Show Resolution - - - - - - diff --git a/src/duckstation-qt/gpusettingswidget.h b/src/duckstation-qt/gpusettingswidget.h deleted file mode 100644 index 5206b77c9..000000000 --- a/src/duckstation-qt/gpusettingswidget.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include - -#include "ui_gpusettingswidget.h" - -class QtHostInterface; -class SettingsDialog; - -class GPUSettingsWidget : public QWidget -{ - Q_OBJECT - -public: - GPUSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog); - ~GPUSettingsWidget(); - -private Q_SLOTS: - void updateScaledDitheringEnabled(); - void populateGPUAdapters(); - void onGPUAdapterIndexChanged(); - void updatePGXPSettingsEnabled(); - -private: - void setupAdditionalUi(); - - Ui::GPUSettingsWidget m_ui; - - QtHostInterface* m_host_interface; -}; diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index ebd7c3a1a..3e62e9bca 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -660,7 +660,10 @@ void MainWindow::connectSignals() [this]() { doSettings(SettingsDialog::Category::ControllerSettings); }); connect(m_ui.actionMemoryCardSettings, &QAction::triggered, [this]() { doSettings(SettingsDialog::Category::MemoryCardSettings); }); - connect(m_ui.actionGPUSettings, &QAction::triggered, [this]() { doSettings(SettingsDialog::Category::GPUSettings); }); + connect(m_ui.actionDisplaySettings, &QAction::triggered, + [this]() { doSettings(SettingsDialog::Category::DisplaySettings); }); + connect(m_ui.actionEnhancementSettings, &QAction::triggered, + [this]() { doSettings(SettingsDialog::Category::EnhancementSettings); }); connect(m_ui.actionAudioSettings, &QAction::triggered, [this]() { doSettings(SettingsDialog::Category::AudioSettings); }); connect(m_ui.actionAdvancedSettings, &QAction::triggered, diff --git a/src/duckstation-qt/mainwindow.ui b/src/duckstation-qt/mainwindow.ui index 2cb4f6191..f4c5c105c 100644 --- a/src/duckstation-qt/mainwindow.ui +++ b/src/duckstation-qt/mainwindow.ui @@ -120,7 +120,8 @@ - + + @@ -340,13 +341,22 @@ &Hotkey Settings... - + :/icons/video-display.png:/icons/video-display.png - &GPU Settings... + &Display Settings... + + + + + + :/icons/antialias-icon.png:/icons/antialias-icon.png + + + &Enhancement Settings... diff --git a/src/duckstation-qt/settingsdialog.cpp b/src/duckstation-qt/settingsdialog.cpp index 70187f43d..a834bd624 100644 --- a/src/duckstation-qt/settingsdialog.cpp +++ b/src/duckstation-qt/settingsdialog.cpp @@ -3,9 +3,10 @@ #include "audiosettingswidget.h" #include "consolesettingswidget.h" #include "controllersettingswidget.h" +#include "displaysettingswidget.h" +#include "enhancementsettingswidget.h" #include "gamelistsettingswidget.h" #include "generalsettingswidget.h" -#include "gpusettingswidget.h" #include "hotkeysettingswidget.h" #include "memorycardsettingswidget.h" #include "qthostinterface.h" @@ -27,7 +28,8 @@ SettingsDialog::SettingsDialog(QtHostInterface* host_interface, QWidget* parent m_hotkey_settings = new HotkeySettingsWidget(host_interface, m_ui.settingsContainer); m_controller_settings = new ControllerSettingsWidget(host_interface, m_ui.settingsContainer); m_memory_card_settings = new MemoryCardSettingsWidget(host_interface, m_ui.settingsContainer, this); - m_gpu_settings = new GPUSettingsWidget(host_interface, m_ui.settingsContainer, this); + m_display_settings = new DisplaySettingsWidget(host_interface, m_ui.settingsContainer, this); + m_enhancement_settings = new EnhancementSettingsWidget(host_interface, m_ui.settingsContainer, this); m_audio_settings = new AudioSettingsWidget(host_interface, m_ui.settingsContainer, this); m_advanced_settings = new AdvancedSettingsWidget(host_interface, m_ui.settingsContainer, this); @@ -37,7 +39,8 @@ SettingsDialog::SettingsDialog(QtHostInterface* host_interface, QWidget* parent m_ui.settingsContainer->insertWidget(static_cast(Category::HotkeySettings), m_hotkey_settings); m_ui.settingsContainer->insertWidget(static_cast(Category::ControllerSettings), m_controller_settings); m_ui.settingsContainer->insertWidget(static_cast(Category::MemoryCardSettings), m_memory_card_settings); - m_ui.settingsContainer->insertWidget(static_cast(Category::GPUSettings), m_gpu_settings); + m_ui.settingsContainer->insertWidget(static_cast(Category::DisplaySettings), m_display_settings); + m_ui.settingsContainer->insertWidget(static_cast(Category::EnhancementSettings), m_enhancement_settings); m_ui.settingsContainer->insertWidget(static_cast(Category::AudioSettings), m_audio_settings); m_ui.settingsContainer->insertWidget(static_cast(Category::AdvancedSettings), m_advanced_settings); @@ -79,9 +82,12 @@ void SettingsDialog::setCategoryHelpTexts() m_category_help_text[static_cast(Category::MemoryCardSettings)] = tr("Memory Card Settings
This page lets you control what mode the memory card emulation will " "function in, and where the images for these cards will be stored on disk."); - m_category_help_text[static_cast(Category::GPUSettings)] = - tr("GPU Settings
These options control the simulation of the GPU in the console. Various " - "enhancements are available, mouse over each for additional information."); + m_category_help_text[static_cast(Category::DisplaySettings)] = + tr("Display Settings
These options control the how the frames generated by the console are " + "displayed on the screen."); + m_category_help_text[static_cast(Category::EnhancementSettings)] = + tr("Enhancement Settings
These options control enhancements which can improve visuals compared " + "to the original console. Mouse over each option for additional information."); m_category_help_text[static_cast(Category::AudioSettings)] = tr("Audio Settings
These options control the audio output of the console. Mouse over an option " "for additional information."); diff --git a/src/duckstation-qt/settingsdialog.h b/src/duckstation-qt/settingsdialog.h index 2c8f28bd9..ea855ccf3 100644 --- a/src/duckstation-qt/settingsdialog.h +++ b/src/duckstation-qt/settingsdialog.h @@ -13,7 +13,8 @@ class HotkeySettingsWidget; class ConsoleSettingsWidget; class ControllerSettingsWidget; class MemoryCardSettingsWidget; -class GPUSettingsWidget; +class DisplaySettingsWidget; +class EnhancementSettingsWidget; class AudioSettingsWidget; class AdvancedSettingsWidget; @@ -30,7 +31,8 @@ public: HotkeySettings, ControllerSettings, MemoryCardSettings, - GPUSettings, + DisplaySettings, + EnhancementSettings, AudioSettings, AdvancedSettings, Count @@ -45,7 +47,8 @@ public: HotkeySettingsWidget* getHotkeySettingsWidget() const { return m_hotkey_settings; } ControllerSettingsWidget* getControllerSettingsWidget() const { return m_controller_settings; } MemoryCardSettingsWidget* getMemoryCardSettingsWidget() const { return m_memory_card_settings; } - GPUSettingsWidget* getGPUSettingsWidget() const { return m_gpu_settings; } + DisplaySettingsWidget* getDisplaySettingsWidget() const { return m_display_settings; } + EnhancementSettingsWidget* getEnhancementSettingsWidget() const { return m_enhancement_settings; } AudioSettingsWidget* getAudioSettingsWidget() const { return m_audio_settings; } AdvancedSettingsWidget* getAdvancedSettingsWidget() const { return m_advanced_settings; } @@ -71,7 +74,8 @@ private: HotkeySettingsWidget* m_hotkey_settings = nullptr; ControllerSettingsWidget* m_controller_settings = nullptr; MemoryCardSettingsWidget* m_memory_card_settings = nullptr; - GPUSettingsWidget* m_gpu_settings = nullptr; + DisplaySettingsWidget* m_display_settings = nullptr; + EnhancementSettingsWidget* m_enhancement_settings = nullptr; AudioSettingsWidget* m_audio_settings = nullptr; AdvancedSettingsWidget* m_advanced_settings = nullptr; diff --git a/src/duckstation-qt/settingsdialog.ui b/src/duckstation-qt/settingsdialog.ui index d588f0e5c..c29ee60de 100644 --- a/src/duckstation-qt/settingsdialog.ui +++ b/src/duckstation-qt/settingsdialog.ui @@ -114,13 +114,22 @@
- GPU Settings + Display Settings :/icons/video-display.png:/icons/video-display.png + + + Enhancement Settings + + + + :/icons/antialias-icon.png:/icons/antialias-icon.png + + Audio Settings