From aecc4f67a126f4fb7a152966a93339d588854f57 Mon Sep 17 00:00:00 2001 From: skidau Date: Fri, 17 Dec 2010 01:34:40 +0000 Subject: [PATCH] Fixed the throttle (Tab) key so that it takes effect when the frame-limiter is used. Hold down Tab to run the emulator unthrottled (Windows only). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6598 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/AudioCommon/Src/Mixer.cpp | 4 ++-- Source/Core/Core/Src/Core.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Core/AudioCommon/Src/Mixer.cpp b/Source/Core/AudioCommon/Src/Mixer.cpp index 74afccc21a..acccede47f 100644 --- a/Source/Core/AudioCommon/Src/Mixer.cpp +++ b/Source/Core/AudioCommon/Src/Mixer.cpp @@ -127,9 +127,9 @@ void CMixer::PushSamples(short *samples, unsigned int num_samples) break; } // Shortcut key for Throttle Skipping - #ifdef _WIN32 +#ifdef _WIN32 if (GetAsyncKeyState(VK_TAB)) break;; - #endif +#endif SLEEP(1); soundStream->Update(); } diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 3c0dc9fc17..46bba9d0d9 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -599,10 +599,12 @@ void VideoThrottle() u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 1) ? SConfig::GetInstance().m_Framelimit * 5 : VideoInterface::TargetRefreshRate; - // When frame limit is NOT off +#ifdef _WIN32 + // Disable the frame-limiter when the throttle (Tab) key is held down + if (!GetAsyncKeyState(VK_TAB)) +#endif if (SConfig::GetInstance().m_Framelimit) { - // Make the limiter a bit loose u32 frametime = ((SConfig::GetInstance().b_UseFPS)? Common::AtomicLoad(DrawnFrame) : DrawnVideo) * 1000 / TargetVPS; u32 timeDifference = (u32)Timer.GetTimeDifference();