Skip to content

Commit

Permalink
Video: add support for 12x resolution multiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
Filoppi committed Sep 9, 2023
1 parent 5e5887a commit 9bf73c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/Config/GraphicsSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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};
Expand Down
19 changes: 10 additions & 9 deletions Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ 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
const QStringList resolution_extra_options{
tr(" for 720p"), tr(" for 1080p"), tr(" for 1440p"), QStringLiteral(""),
tr(" for 4K"), QStringLiteral(""), tr(" for 5K"), QStringLiteral(""),
QStringLiteral(""), QStringLiteral(""), tr(" for 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
Expand All @@ -77,10 +76,12 @@ 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)")
const int extra_index = resolution_options.size() - 2;
resolution_options.append(tr("%1x Native (%2x%3)%4")
.arg(QString::number(scale),
QString::number(static_cast<int>(EFB_WIDTH) * scale),
QString::number(static_cast<int>(EFB_HEIGHT) * scale)));
QString::number(static_cast<int>(EFB_HEIGHT) * scale),
resolution_extra_options[extra_index]));
}

m_ir_combo = new ConfigChoice(resolution_options, Config::GFX_EFB_SCALE);
Expand Down

0 comments on commit 9bf73c4

Please sign in to comment.