diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-10-06 02:37:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-06 02:37:36 +0200 |
| commit | 1c433d5f3f0c1da6fd95504e4d6f9cef4fa2e118 (patch) | |
| tree | dc04c397b7589dff1ca838af197379a6375184a7 /Source/Core | |
| parent | 0291d2c45f000a04191be3c68603ebd0cbffdf6b (diff) | |
| parent | 8027c88e58983f26195eb2a5e5347b3f34926926 (diff) | |
Merge pull request #12171 from Filoppi/support_8k
Add support for resolutions multipliers up to 12x (~8k)
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Config/GraphicsSettings.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp | 38 |
2 files changed, 28 insertions, 12 deletions
diff --git a/Source/Core/Core/Config/GraphicsSettings.cpp b/Source/Core/Core/Config/GraphicsSettings.cpp index ea8aa05f48..fb37c60ffe 100644 --- a/Source/Core/Core/Config/GraphicsSettings.cpp +++ b/Source/Core/Core/Config/GraphicsSettings.cpp @@ -76,7 +76,7 @@ const Info<bool> GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, const Info<u32> GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1}; const Info<bool> GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false}; const Info<int> GFX_EFB_SCALE{{System::GFX, "Settings", "InternalResolution"}, 1}; -const Info<int> GFX_MAX_EFB_SCALE{{System::GFX, "Settings", "MaxInternalResolution"}, 8}; +const Info<int> GFX_MAX_EFB_SCALE{{System::GFX, "Settings", "MaxInternalResolution"}, 12}; const Info<bool> GFX_TEXFMT_OVERLAY_ENABLE{{System::GFX, "Settings", "TexFmtOverlayEnable"}, false}; const Info<bool> GFX_TEXFMT_OVERLAY_CENTER{{System::GFX, "Settings", "TexFmtOverlayCenter"}, false}; const Info<bool> GFX_ENABLE_WIREFRAME{{System::GFX, "Settings", "WireFrame"}, false}; diff --git a/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp index f181780749..593f05d4ae 100644 --- a/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp @@ -62,13 +62,17 @@ void EnhancementsWidget::CreateWidgets() auto* enhancements_layout = new QGridLayout(); enhancements_box->setLayout(enhancements_layout); - // Only display the first 8 scales, which most users will not go beyond. - QStringList resolution_options{ - tr("Auto (Multiple of 640x528)"), tr("Native (640x528)"), - tr("2x Native (1280x1056) for 720p"), tr("3x Native (1920x1584) for 1080p"), - tr("4x Native (2560x2112) for 1440p"), tr("5x Native (3200x2640)"), - tr("6x Native (3840x3168) for 4K"), tr("7x Native (4480x3696)"), - tr("8x Native (5120x4224) for 5K")}; + QStringList resolution_options{tr("Auto (Multiple of 640x528)"), tr("Native (640x528)")}; + // From 2x up. + // To calculate the suggested internal resolution scale for each common output resolution, + // we find the minimum multiplier that results in an equal or greater resolution than the + // output one, on both width and height. + // Note that often games don't render to the full resolution, but have some black bars + // on the edges; this is not accounted for in the calculations. + const QStringList resolution_extra_options{ + tr("720p"), tr("1080p"), tr("1440p"), QStringLiteral(""), + tr("4K"), QStringLiteral(""), tr("5K"), QStringLiteral(""), + QStringLiteral(""), QStringLiteral(""), tr("8K")}; const int visible_resolution_option_count = static_cast<int>(resolution_options.size()); // If the current scale is greater than the max scale in the ini, add sufficient options so that @@ -77,10 +81,22 @@ void EnhancementsWidget::CreateWidgets() std::max(Config::Get(Config::GFX_EFB_SCALE), Config::Get(Config::GFX_MAX_EFB_SCALE)); for (int scale = static_cast<int>(resolution_options.size()); scale <= max_efb_scale; scale++) { - resolution_options.append(tr("%1x Native (%2x%3)") - .arg(QString::number(scale), - QString::number(static_cast<int>(EFB_WIDTH) * scale), - QString::number(static_cast<int>(EFB_HEIGHT) * scale))); + const QString scale_text = QString::number(scale); + const QString width_text = QString::number(static_cast<int>(EFB_WIDTH) * scale); + const QString height_text = QString::number(static_cast<int>(EFB_HEIGHT) * scale); + const int extra_index = resolution_options.size() - 2; + const QString extra_text = resolution_extra_options.size() > extra_index ? + resolution_extra_options[extra_index] : + QStringLiteral(""); + if (extra_text.isEmpty()) + { + resolution_options.append(tr("%1x Native (%2x%3)").arg(scale_text, width_text, height_text)); + } + else + { + resolution_options.append( + tr("%1x Native (%2x%3) for %4").arg(scale_text, width_text, height_text, extra_text)); + } } m_ir_combo = new ConfigChoice(resolution_options, Config::GFX_EFB_SCALE); |
