Merge pull request #2024 from RisingFog/irgui

Add UI Support for up to 8x Internal Resolutions
This commit is contained in:
Markus Wick 2015-06-11 15:47:39 +02:00
commit be1d1e2798
4 changed files with 10 additions and 17 deletions

View file

@ -1352,7 +1352,7 @@ void CFrame::ParseHotkeys()
{ {
OSDChoice = 1; OSDChoice = 1;
// Toggle native resolution // Toggle native resolution
if (++g_Config.iEFBScale > SCALE_4X) if (++g_Config.iEFBScale > 11) // 8X Internal Resolution
g_Config.iEFBScale = SCALE_AUTO; g_Config.iEFBScale = SCALE_AUTO;
} }
if (IsHotkey(HK_INCREASE_IR)) if (IsHotkey(HK_INCREASE_IR))

View file

@ -349,16 +349,17 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// Internal resolution // Internal resolution
{ {
const wxString efbscale_choices[] = { _("Auto (Window Size)"), _("Auto (Multiple of 640x528)"), const wxString efbscale_choices[] = { _("Auto (Window Size)"), _("Auto (Multiple of 640x528)"),
_("1x Native (640x528)"), _("1.5x Native (960x792)"), _("2x Native (1280x1056)"), _("Native (640x528)"), _("1.5x Native (960x792)"), _("2x Native (1280x1056) for 720p"), _("2.5x Native (1600x1320)"),
_("2.5x Native (1600x1320)"), _("3x Native (1920x1584)"), _("4x Native (2560x2112)"), _("Custom") }; _("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, 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); ArraySize(efbscale_choices) : ArraySize(efbscale_choices) - 1, efbscale_choices);
if (vconfig.iEFBScale > 7) if (vconfig.iEFBScale > 11)
choice_efbscale->SetSelection(8); choice_efbscale->SetSelection(12);
szr_enh->Add(new wxStaticText(page_enh, wxID_ANY, _("Internal Resolution:")), 1, wxALIGN_CENTER_VERTICAL, 0); szr_enh->Add(new wxStaticText(page_enh, wxID_ANY, _("Internal Resolution:")), 1, wxALIGN_CENTER_VERTICAL, 0);
szr_enh->Add(choice_efbscale); szr_enh->Add(choice_efbscale);

View file

@ -211,8 +211,6 @@ bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int
efb_scale_denominatorX = efb_scale_denominatorY = 2; efb_scale_denominatorX = efb_scale_denominatorY = 2;
break; break;
case SCALE_3X:
case SCALE_4X:
default: default:
efb_scale_numeratorX = efb_scale_numeratorY = s_last_efb_scale - 3; efb_scale_numeratorX = efb_scale_numeratorY = s_last_efb_scale - 3;
efb_scale_denominatorX = efb_scale_denominatorY = 1; efb_scale_denominatorX = efb_scale_denominatorY = 1;
@ -328,7 +326,7 @@ void Renderer::DrawDebugText()
if ((u32)OSDTime > Common::Timer::GetTimeMs()) if ((u32)OSDTime > Common::Timer::GetTimeMs())
{ {
const char* res_text = ""; std::string res_text;
switch (g_ActiveConfig.iEFBScale) switch (g_ActiveConfig.iEFBScale)
{ {
case SCALE_AUTO: case SCALE_AUTO:
@ -349,14 +347,10 @@ void Renderer::DrawDebugText()
case SCALE_2_5X: case SCALE_2_5X:
res_text = "2.5x"; res_text = "2.5x";
break; break;
case SCALE_3X: default:
res_text = "3x"; res_text = StringFromFormat("%dx", g_ActiveConfig.iEFBScale - 3);
break;
case SCALE_4X:
res_text = "4x";
break; break;
} }
const char* ar_text = ""; const char* ar_text = "";
switch (g_ActiveConfig.iAspectRatio) switch (g_ActiveConfig.iAspectRatio)
{ {

View file

@ -40,8 +40,6 @@ enum EFBScale
SCALE_1_5X, SCALE_1_5X,
SCALE_2X, SCALE_2X,
SCALE_2_5X, SCALE_2_5X,
SCALE_3X,
SCALE_4X,
}; };
enum StereoMode enum StereoMode