From f83eb0a2ca7ff55ffc8c897353bdde1be5f0e45b Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Thu, 13 Oct 2005 01:34:06 +0000 Subject: [PATCH] Send key off when disabled only once. (fixes space bar not responding) --- .../arch/InputHandler/InputHandler_MonkeyKeyboard.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp b/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp index b4cba1fd0d..7c7389ebed 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp @@ -59,13 +59,20 @@ int GetRandomKeyboadKey() void InputHandler_MonkeyKeyboard::Update(float fDeltaTime) { + static bool wasRunning = false; if( !PREFSMAN->m_bMonkeyInput ) { - // End the previous key - ButtonPressed(m_diLast, false); + if( wasRunning ) + { + // End the previous key + ButtonPressed(m_diLast, false); + wasRunning = false; + } InputHandler::UpdateTimer(); return; } + + wasRunning = true; float fSecsAgo = m_timerPressButton.Ago();