diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2016-10-15 16:30:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-15 16:30:43 -0700 |
| commit | 74939f316fd176f714ac5316d0fefe0a267fc1d1 (patch) | |
| tree | 6df324ed9ac5f3d7ce23f591f57230a747c52fd3 /Source/Core/DolphinWX/Frame.cpp | |
| parent | 183f3c375971233213bbc4a222a76c8f3940ebe5 (diff) | |
| parent | 1cc18760026c1bc9d5192265f3ace634978f6bfc (diff) | |
Merge pull request #4353 from degasus/OSD
OSD: Revert broken cleanup.
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 96 |
1 files changed, 9 insertions, 87 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 2253297bb6..6394714a3d 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1444,16 +1444,14 @@ void CFrame::ParseHotkeys() if (IsHotkey(HK_INCREASE_IR)) { + OSDChoice = 1; ++g_Config.iEFBScale; - OSDPrintInternalResolution(); } if (IsHotkey(HK_DECREASE_IR)) { + OSDChoice = 1; if (--g_Config.iEFBScale < SCALE_AUTO) - { g_Config.iEFBScale = SCALE_AUTO; - } - OSDPrintInternalResolution(); } if (IsHotkey(HK_TOGGLE_CROP)) { @@ -1461,26 +1459,28 @@ void CFrame::ParseHotkeys() } if (IsHotkey(HK_TOGGLE_AR)) { + OSDChoice = 2; // Toggle aspect ratio g_Config.iAspectRatio = (g_Config.iAspectRatio + 1) & 3; - OSDPrintAspectRatio(); } if (IsHotkey(HK_TOGGLE_EFBCOPIES)) { + OSDChoice = 3; // Toggle EFB copies between EFB2RAM and EFB2Texture g_Config.bSkipEFBCopyToRam = !g_Config.bSkipEFBCopyToRam; - OSDPrintEFB(); } if (IsHotkey(HK_TOGGLE_FOG)) { + OSDChoice = 4; g_Config.bDisableFog = !g_Config.bDisableFog; - OSDPrintFog(); } if (IsHotkey(HK_TOGGLE_TEXTURES)) g_Config.bHiresTextures = !g_Config.bHiresTextures; Core::SetIsThrottlerTempDisabled(IsHotkey(HK_TOGGLE_THROTTLE, true)); if (IsHotkey(HK_DECREASE_EMULATION_SPEED)) { + OSDChoice = 5; + if (SConfig::GetInstance().m_EmulationSpeed <= 0.0f) SConfig::GetInstance().m_EmulationSpeed = 1.0f; else if (SConfig::GetInstance().m_EmulationSpeed >= 0.2f) @@ -1491,19 +1491,17 @@ void CFrame::ParseHotkeys() if (SConfig::GetInstance().m_EmulationSpeed >= 0.95f && SConfig::GetInstance().m_EmulationSpeed <= 1.05f) SConfig::GetInstance().m_EmulationSpeed = 1.0f; - - OSDPrintEmulationSpeed(); } if (IsHotkey(HK_INCREASE_EMULATION_SPEED)) { + OSDChoice = 5; + if (SConfig::GetInstance().m_EmulationSpeed > 0.0f) SConfig::GetInstance().m_EmulationSpeed += 0.1f; if (SConfig::GetInstance().m_EmulationSpeed >= 0.95f && SConfig::GetInstance().m_EmulationSpeed <= 1.05f) SConfig::GetInstance().m_EmulationSpeed = 1.0f; - - OSDPrintEmulationSpeed(); } if (IsHotkey(HK_SAVE_STATE_SLOT_SELECTED)) { @@ -1718,79 +1716,3 @@ void CFrame::HandleSignal(wxTimerEvent& event) return; Close(); } - -void CFrame::OSDPrintInternalResolution() -{ - std::string text; - switch (g_Config.iEFBScale) - { - case SCALE_AUTO: - text = "Auto (fractional)"; - break; - case SCALE_AUTO_INTEGRAL: - text = "Auto (integral)"; - break; - case SCALE_1X: - text = "Native"; - break; - case SCALE_1_5X: - text = "1.5x"; - break; - case SCALE_2X: - text = "2x"; - break; - case SCALE_2_5X: - text = "2.5x"; - break; - default: - text = StringFromFormat("%dx", g_Config.iEFBScale - 3); - break; - } - - OSD::AddMessage("Internal Resolution: " + text); -} - -void CFrame::OSDPrintAspectRatio() -{ - std::string text; - switch (g_Config.iAspectRatio) - { - case ASPECT_AUTO: - text = "Auto"; - break; - case ASPECT_STRETCH: - text = "Stretch"; - break; - case ASPECT_ANALOG: - text = "Force 4:3"; - break; - case ASPECT_ANALOG_WIDE: - text = "Force 16:9"; - break; - } - - OSD::AddMessage("Aspect Ratio: " + text + (g_Config.bCrop ? " (crop)" : "")); -} - -void CFrame::OSDPrintEFB() -{ - OSD::AddMessage(std::string("Copy EFB: ") + - (g_Config.bSkipEFBCopyToRam ? "to Texture" : "to RAM")); -} - -void CFrame::OSDPrintFog() -{ - OSD::AddMessage(std::string("Fog: ") + (g_Config.bDisableFog ? "Disabled" : "Enabled")); -} - -void CFrame::OSDPrintEmulationSpeed() -{ - std::string text = "Speed Limit: "; - - if (SConfig::GetInstance().m_EmulationSpeed <= 0) - text += "Unlimited"; - else - text += StringFromFormat("%li%%", std::lround(SConfig::GetInstance().m_EmulationSpeed * 100.f)); - - OSD::AddMessage(text); -} |
