UI: Add text to upscaling multipliers and remove two fractional

This commit is contained in:
TheTechnician27 2024-07-03 21:20:23 -05:00 committed by refractionpcsx2
parent defb50aac2
commit 10a7fe07a2
7 changed files with 79 additions and 39 deletions

View File

@ -61,7 +61,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
dialog->registerWidgetHelp(m_ui.eeRoundingMode, tr("Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Floating Point Unit (EE FPU). "
"Because the various FPUs in the PS2 are non-compliant with international standards, some games may need different modes to do math correctly. The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division is rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division are rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.eeClampMode, tr("Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range. "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));

View File

@ -53,7 +53,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Game Fixes (NOT recommended to change globally)</string>
<string>Game Fixes</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>

View File

@ -235,6 +235,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useDebugDevice, "EmuCore/GS", "UseDebugDevice", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.skipPresentingDuplicateFrames, "EmuCore/GS", "SkipDuplicateFrames", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableMailboxPresentation, "EmuCore/GS", "DisableMailboxPresentation", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.extendedUpscales, "EmuCore/GS", "ExtendedUpscalingMultipliers", false);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.exclusiveFullscreenControl, "EmuCore/GS", "ExclusiveFullscreenControl", -1, -1);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.overrideTextureBarriers, "EmuCore/GS", "OverrideTextureBarriers", -1, -1);
SettingWidgetBinder::BindWidgetToIntSetting(
@ -284,6 +285,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
connect(m_ui.rendererDropdown, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onRendererChanged);
connect(m_ui.enableHWFixes, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions);
connect(m_ui.extendedUpscales, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions);
connect(m_ui.textureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onTextureFilteringChange);
connect(m_ui.swTextureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onSWTextureFilteringChange);
updateRendererDependentOptions();
@ -302,7 +304,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
m_ui.gsDownloadMode = nullptr;
// Don't allow setting hardware fixes globally.
// Too many stupid youtube "best settings" guides, that break other games.
// Too many stupid YouTube "best settings" guides that break other games.
m_ui.hardwareRenderingOptionsLayout->removeWidget(m_ui.enableHWFixes);
delete m_ui.enableHWFixes;
m_ui.enableHWFixes = nullptr;
@ -341,6 +343,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
m_ui.exclusiveFullscreenControl = nullptr;
m_ui.useBlitSwapChain = nullptr;
m_ui.disableMailboxPresentation = nullptr;
m_ui.extendedUpscales = nullptr;
m_ui.skipPresentingDuplicateFrames = nullptr;
m_ui.overrideTextureBarriers = nullptr;
m_ui.disableFramebufferFetch = nullptr;
@ -784,6 +787,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
tr("Forces the use of FIFO over Mailbox presentation, i.e. double buffering instead of triple buffering. "
"Usually results in worse frame pacing."));
dialog->registerWidgetHelp(m_ui.extendedUpscales, tr("Extended Upscaling Multipliers"), tr("Unchecked"),
tr("Displays additional, very high upscaling multipliers dependent on GPU capability."));
dialog->registerWidgetHelp(m_ui.useDebugDevice, tr("Enable Debug Device"), tr("Unchecked"),
tr("Enables API-level validation of graphics commands."));
@ -1109,22 +1115,37 @@ void GraphicsSettingsWidget::populateUpscaleMultipliers(u32 max_upscale_multipli
{
static constexpr std::pair<const char*, float> templates[] = {
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Native (PS2) (Default)"), 1.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "1.25x Native"), 1.25f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "1.5x Native"), 1.5f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "1.75x Native"), 1.75f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "2x Native (~720p)"), 2.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "2.25x Native"), 2.25f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "2.5x Native"), 2.5f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "2.75x Native"), 2.75f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "3x Native (~1080p)"), 3.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "3.5x Native"), 3.5f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "4x Native (~1440p/2K)"), 4.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "5x Native (~1620p)"), 5.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "6x Native (~2160p/4K)"), 6.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "7x Native (~2520p)"), 7.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "8x Native (~2880p/5K)"), 8.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "1.25x Native (~450px)"), 1.25f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "1.5x Native (~540px)"), 1.5f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "1.75x Native (~630px)"), 1.75f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "2x Native (~720px/HD)"), 2.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "2.5x Native (~900px/HD+)"), 2.5f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "3x Native (~1080px/FHD)"), 3.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "3.5x Native (~1260px)"), 3.5f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "4x Native (~1440px/QHD)"), 4.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "5x Native (~1800px/QHD+)"), 5.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "6x Native (~2160px/4K UHD)"), 6.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "7x Native (~2520px)"), 7.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "8x Native (~2880px/5K UHD)"), 8.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "9x Native (~3240px)"), 9.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "10x Native (~3600px/6K UHD)"), 10.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "11x Native (~3960px)"), 11.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "12x Native (~4320px/8K UHD)"), 12.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "13x Native (~4680px)"), 13.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "14x Native (~5040px)"), 14.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "15x Native (~5400px)"), 15.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "16x Native (~5760px)"), 16.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "17x Native (~6120px)"), 17.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "18x Native (~6480px/12K UHD)"), 18.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "19x Native (~6840px)"), 19.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "20x Native (~7200px)"), 20.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "21x Native (~7560px)"), 21.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "22x Native (~7920px)"), 22.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "23x Native (~8280px)"), 23.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "24x Native (~8640px/16K UHD)"), 24.0f},
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "25x Native (~9000px)"), 25.0f},
};
static constexpr u32 max_template_multiplier = 8;
static constexpr u32 max_template_multiplier = 25;
// Limit the dropdown to 12x if we're not showing advanced settings. Save the noobs.
static constexpr u32 max_non_advanced_multiplier = 12;
@ -1132,16 +1153,16 @@ void GraphicsSettingsWidget::populateUpscaleMultipliers(u32 max_upscale_multipli
QSignalBlocker sb(m_ui.upscaleMultiplier);
m_ui.upscaleMultiplier->clear();
const u32 max_shown_multiplier = m_ui.extendedUpscales && m_ui.extendedUpscales->checkState() == Qt::Checked ?
max_upscale_multiplier :
std::min(max_upscale_multiplier, max_non_advanced_multiplier);
for (const auto& [name, value] : templates)
{
if (value > max_upscale_multiplier)
continue;
if (value > max_shown_multiplier)
break;
m_ui.upscaleMultiplier->addItem(tr(name), QVariant(value));
}
const u32 max_shown_multiplier = QtHost::ShouldShowAdvancedSettings() ?
max_upscale_multiplier :
std::min(max_upscale_multiplier, max_non_advanced_multiplier);
for (u32 i = max_template_multiplier + 1; i <= max_shown_multiplier; i++)
m_ui.upscaleMultiplier->addItem(tr("%1x Native").arg(i), QVariant(static_cast<float>(i)));

View File

@ -2087,6 +2087,13 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="extendedUpscales">
<property name="text">
<string>Extended Upscaling Multipliers</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">

View File

@ -598,6 +598,7 @@ struct Pcsx2Config
SynchronousMTGS : 1,
VsyncEnable : 1,
DisableMailboxPresentation : 1,
ExtendedUpscalingMultipliers : 1,
PCRTCAntiBlur : 1,
DisableInterlaceOffset : 1,
PCRTCOffsets : 1,

View File

@ -3485,20 +3485,22 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
};
static const char* s_resolution_options[] = {
FSUI_NSTR("Native (PS2)"),
FSUI_NSTR("1.25x Native"),
FSUI_NSTR("1.5x Native"),
FSUI_NSTR("1.75x Native"),
FSUI_NSTR("2x Native (~720p)"),
FSUI_NSTR("2.25x Native"),
FSUI_NSTR("2.5x Native"),
FSUI_NSTR("2.75x Native"),
FSUI_NSTR("3x Native (~1080p)"),
FSUI_NSTR("3.5x Native"),
FSUI_NSTR("4x Native (~1440p/2K)"),
FSUI_NSTR("5x Native (~1620p)"),
FSUI_NSTR("6x Native (~2160p/4K)"),
FSUI_NSTR("7x Native (~2520p)"),
FSUI_NSTR("8x Native (~2880p)"),
FSUI_NSTR("1.25x Native (~450px)"),
FSUI_NSTR("1.5x Native (~540px)"),
FSUI_NSTR("1.75x Native (~630px)"),
FSUI_NSTR("2x Native (~720px/HD)"),
FSUI_NSTR("2.5x Native (~900px/HD+)"),
FSUI_NSTR("3x Native (~1080px/FHD)"),
FSUI_NSTR("3.5x Native (~1260px)"),
FSUI_NSTR("4x Native (~1440px/QHD)"),
FSUI_NSTR("5x Native (~1800px/QHD+)"),
FSUI_NSTR("6x Native (~2160px/4K UHD)"),
FSUI_NSTR("7x Native (~2520px)"),
FSUI_NSTR("8x Native (~2880px/5K UHD)"),
FSUI_NSTR("9x Native (~3240px)"),
FSUI_NSTR("10x Native (~3600px/6K UHD)"),
FSUI_NSTR("11x Native (~3960px)"),
FSUI_NSTR("12x Native (~4320px/8K UHD)"),
};
static const char* s_resolution_values[] = {
"1",
@ -3506,9 +3508,7 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
"1.5",
"1.75",
"2",
"2.25",
"2.5",
"2.75",
"3",
"3.5",
"4",
@ -3516,6 +3516,10 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
"6",
"7",
"8",
"9",
"10",
"11",
"12",
};
static constexpr const char* s_bilinear_options[] = {
FSUI_NSTR("Nearest"),
@ -3905,6 +3909,10 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
FSUI_CSTR("Forces the use of FIFO over Mailbox presentation, i.e. double buffering instead of triple buffering. "
"Usually results in worse frame pacing."),
"EmuCore/GS", "DisableMailboxPresentation", false);
/* DrawToggleSetting(bsi, FSUI_CSTR("Extended Upscaling Multipliers"),
FSUI_CSTR("Displays additional, very high upscaling multipliers dependent on GPU capability."),
"EmuCore/GS", "ExtendedUpscalingMultipliers", false); */
// TODO: Immplement this button properly
if (IsEditingGameSettings(bsi))
{
DrawIntListSetting(bsi, FSUI_CSTR("Hardware Download Mode"), FSUI_CSTR("Changes synchronization behavior for GS downloads."),
@ -7108,6 +7116,8 @@ TRANSLATE_NOOP("FullscreenUI", "Skip Presenting Duplicate Frames");
TRANSLATE_NOOP("FullscreenUI", "Skips displaying frames that don't change in 25/30fps games. Can improve speed, but increase input lag/make frame pacing worse.");
TRANSLATE_NOOP("FullscreenUI", "Disable Mailbox Presentation");
TRANSLATE_NOOP("FullscreenUI", "Forces the use of FIFO over Mailbox presentation, i.e. double buffering instead of triple buffering. Usually results in worse frame pacing.");
TRANSLATE_NOOP("FullscreenUI", "Extended Upscaling Multipliers");
TRANSLATE_NOOP("FullscreenUI", "Displays additional, very high upscaling multipliers dependent on GPU capability.");
TRANSLATE_NOOP("FullscreenUI", "Hardware Download Mode");
TRANSLATE_NOOP("FullscreenUI", "Changes synchronization behavior for GS downloads.");
TRANSLATE_NOOP("FullscreenUI", "Allow Exclusive Fullscreen");

View File

@ -791,6 +791,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
SettingsWrapBitBool(VsyncEnable);
SettingsWrapBitBool(DisableMailboxPresentation);
SettingsWrapBitBool(ExtendedUpscalingMultipliers);
SettingsWrapEntry(VsyncQueueSize);