From 3ff4ec275ae931dfc946cdb09825efa7b9e60d18 Mon Sep 17 00:00:00 2001 From: degasus Date: Wed, 16 Dec 2015 00:10:47 +0100 Subject: Throttler: Rename "framelimiter" to "emulation speed". We don't throttle by frames, we throttle by coretiming speed. So looking up VI for calculating the speed was just very wrong. The new ini option is a float, 1.0f for fullspeed. In the GUI, percentual values are used. --- Source/Core/DolphinWX/Frame.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'Source/Core/DolphinWX/Frame.cpp') diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 4972bb6b4e..88e3128a78 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1404,16 +1404,30 @@ void CFrame::ParseHotkeys() OSDChoice = 4; g_Config.bDisableFog = !g_Config.bDisableFog; } - Core::SetIsFramelimiterTempDisabled(IsHotkey(HK_TOGGLE_THROTTLE, true)); - if (IsHotkey(HK_DECREASE_FRAME_LIMIT)) + Core::SetIsThrottlerTempDisabled(IsHotkey(HK_TOGGLE_THROTTLE, true)); + if (IsHotkey(HK_DECREASE_EMULATION_SPEED)) { - if (--SConfig::GetInstance().m_Framelimit > 0x19) - SConfig::GetInstance().m_Framelimit = 0x19; + OSDChoice = 5; + + if (SConfig::GetInstance().m_EmulationSpeed <= 0.0f) + SConfig::GetInstance().m_EmulationSpeed = 1.0f; + else if (SConfig::GetInstance().m_EmulationSpeed >= 0.2f) + SConfig::GetInstance().m_EmulationSpeed -= 0.1f; + else + 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; } - if (IsHotkey(HK_INCREASE_FRAME_LIMIT)) + if (IsHotkey(HK_INCREASE_EMULATION_SPEED)) { - if (++SConfig::GetInstance().m_Framelimit > 0x19) - SConfig::GetInstance().m_Framelimit = 0; + 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; } if (IsHotkey(HK_SAVE_STATE_SLOT_SELECTED)) { -- cgit v1.2.3