From 7e47dd8dcecb623222b772c7e54b5c166a0a6483 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 24 Jan 2006 04:44:15 +0000 Subject: [PATCH] do sticky slow/halt without actually pressing keys --- stepmania/src/ScreenDebugOverlay.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/stepmania/src/ScreenDebugOverlay.cpp b/stepmania/src/ScreenDebugOverlay.cpp index 1c898552d1..3e405bd282 100644 --- a/stepmania/src/ScreenDebugOverlay.cpp +++ b/stepmania/src/ScreenDebugOverlay.cpp @@ -208,6 +208,11 @@ void ScreenDebugOverlay::Update( float fDeltaTime ) fRate /= 4; } + if( g_bIsHalt ) + fRate = 0; + else if( g_bIsSlow ) + fRate /= 4; + GameLoop::SetUpdateRate( fRate ); } @@ -332,22 +337,6 @@ bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input ) // static void SetSpeed() { - if( g_bIsHalt ) - { - INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_KEYBOARD, KEY_TAB), true ); - INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_KEYBOARD, KEY_ACCENT), true ); - } - else if( g_bIsSlow ) - { - INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_KEYBOARD, KEY_TAB), false ); - INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_KEYBOARD, KEY_ACCENT), true ); - } - else - { - INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_KEYBOARD, KEY_TAB), false ); - INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_KEYBOARD, KEY_ACCENT), false ); - } - // PauseMusic( g_bIsHalt ); }