summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Frame.cpp
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2014-05-01 12:40:01 +0200
committerTony Wasserka <neobrainx@gmail.com>2014-05-01 12:40:01 +0200
commit557c3db4620f754ab3064599a9ed50f42579bb83 (patch)
tree18f1caa849257894cd5489b5a088319fbfd0a19a /Source/Core/DolphinWX/Frame.cpp
parent95f097d79b37fef64752d40e3247da6f7f818932 (diff)
parentf254fdfd965c0d860e2e457de24fb4aa1b00a957 (diff)
Merge pull request #81 from degasus/skip_framelimit_hotkey
Add a hotkey for disabling the framelimit.
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index 87fb799616..26627d2340 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -940,6 +940,10 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
OSDChoice = 4;
g_Config.bDisableFog = !g_Config.bDisableFog;
}
+ else if (IsHotkey(event, HK_TOGGLE_THROTTLE))
+ {
+ Core::SetIsFramelimiterTempDisabled(true);
+ }
else if (IsHotkey(event, HK_INCREASE_FRAME_LIMIT))
{
if (++SConfig::GetInstance().m_Framelimit > 0x19)
@@ -1040,7 +1044,18 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
void CFrame::OnKeyUp(wxKeyEvent& event)
{
- event.Skip();
+ if(Core::GetState() != Core::CORE_UNINITIALIZED &&
+ (RendererHasFocus() || TASInputHasFocus()))
+ {
+ if (IsHotkey(event, HK_TOGGLE_THROTTLE))
+ {
+ Core::SetIsFramelimiterTempDisabled(false);
+ }
+ }
+ else
+ {
+ event.Skip();
+ }
}
void CFrame::OnMouse(wxMouseEvent& event)