From f801ccc9b2607d0ebdc4c658a2c750224ffc10d7 Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Thu, 11 Jun 2015 15:47:39 +0200 Subject: [PATCH] Merge pull request #2024 from RisingFog/irgui Add UI Support for up to 8x Internal Resolutions --- Source/Core/DolphinWX/Frame.cpp | 2 +- Source/Core/DolphinWX/VideoConfigDiag.cpp | 11 ++++++----- Source/Core/VideoCommon/RenderBase.cpp | 12 +++--------- Source/Core/VideoCommon/VideoConfig.h | 2 -- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 05f01a9cb0..39b9ba544f 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1366,7 +1366,7 @@ void CFrame::ParseHotkeys() { OSDChoice = 1; // Toggle native resolution - if (++g_Config.iEFBScale > SCALE_4X) + if (++g_Config.iEFBScale > 11) // 8X Internal Resolution g_Config.iEFBScale = SCALE_AUTO; } if (IsHotkey(HK_INCREASE_IR)) diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index a5639fdff5..8e469d1116 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -349,16 +349,17 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con // Internal resolution { const wxString efbscale_choices[] = { _("Auto (Window Size)"), _("Auto (Multiple of 640x528)"), - _("1x Native (640x528)"), _("1.5x Native (960x792)"), _("2x Native (1280x1056)"), - _("2.5x Native (1600x1320)"), _("3x Native (1920x1584)"), _("4x Native (2560x2112)"), _("Custom") }; + _("Native (640x528)"), _("1.5x Native (960x792)"), _("2x Native (1280x1056) for 720p"), _("2.5x Native (1600x1320)"), + _("3x Native (1920x1584) for 1080p"), _("4x Native (2560x2112) for 1440p"), _("5x Native (3200x2640)"), + _("6x Native (3840x3168) for 4K"), _("7x Native (4480x3696)"), _("8x Native (5120x4224) for 5K"), _("Custom") }; wxChoice *const choice_efbscale = CreateChoice(page_enh, - vconfig.iEFBScale, wxGetTranslation(internal_res_desc), (vconfig.iEFBScale > 7) ? + vconfig.iEFBScale, wxGetTranslation(internal_res_desc), (vconfig.iEFBScale > 11) ? ArraySize(efbscale_choices) : ArraySize(efbscale_choices) - 1, efbscale_choices); - if (vconfig.iEFBScale > 7) - choice_efbscale->SetSelection(8); + if (vconfig.iEFBScale > 11) + choice_efbscale->SetSelection(12); szr_enh->Add(new wxStaticText(page_enh, wxID_ANY, _("Internal Resolution:")), 1, wxALIGN_CENTER_VERTICAL, 0); szr_enh->Add(choice_efbscale); diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index dba0667b64..6071ce9511 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -211,8 +211,6 @@ bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int efb_scale_denominatorX = efb_scale_denominatorY = 2; break; - case SCALE_3X: - case SCALE_4X: default: efb_scale_numeratorX = efb_scale_numeratorY = s_last_efb_scale - 3; efb_scale_denominatorX = efb_scale_denominatorY = 1; @@ -328,7 +326,7 @@ void Renderer::DrawDebugText() if ((u32)OSDTime > Common::Timer::GetTimeMs()) { - const char* res_text = ""; + std::string res_text; switch (g_ActiveConfig.iEFBScale) { case SCALE_AUTO: @@ -349,14 +347,10 @@ void Renderer::DrawDebugText() case SCALE_2_5X: res_text = "2.5x"; break; - case SCALE_3X: - res_text = "3x"; - break; - case SCALE_4X: - res_text = "4x"; + default: + res_text = StringFromFormat("%dx", g_ActiveConfig.iEFBScale - 3); break; } - const char* ar_text = ""; switch (g_ActiveConfig.iAspectRatio) { diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 9635c90d19..48ed3fc005 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -40,8 +40,6 @@ enum EFBScale SCALE_1_5X, SCALE_2X, SCALE_2_5X, - SCALE_3X, - SCALE_4X, }; enum StereoMode