From 897c1c905787e014fdb178d98145faacc9a713cf Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 8 Sep 2006 18:59:57 +0000 Subject: [PATCH] revert "simplify"; this removed an API call --- stepmania/src/InputFilter.cpp | 25 ++++++++++++++++++------- stepmania/src/InputFilter.h | 1 + 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/stepmania/src/InputFilter.cpp b/stepmania/src/InputFilter.cpp index 41e7d51320..2f113bd2f2 100644 --- a/stepmania/src/InputFilter.cpp +++ b/stepmania/src/InputFilter.cpp @@ -89,13 +89,8 @@ InputFilter::~InputFilter() void InputFilter::Reset() { - LockMut(*queuemutex); - RageTimer now; - DeviceInputList vDeviceInputs; - - GetPressedButtons( vDeviceInputs ); - FOREACH_CONST( DeviceInput, vDeviceInputs, di ) - ButtonPressed( DeviceInput(di->device, di->button, -1, now), false ); + for( int i=0; i DeviceInputs; + GetPressedButtons( DeviceInputs ); + + FOREACH( DeviceInput, DeviceInputs, di ) + { + if( di->device == device ) + ButtonPressed( DeviceInput(device, di->button, -1, now), false ); + } +} + /* Check for reportable presses. */ void InputFilter::CheckButtonChange( ButtonState &bs, DeviceInput di, const RageTimer &now ) { diff --git a/stepmania/src/InputFilter.h b/stepmania/src/InputFilter.h index fce00613c4..89aaea5c62 100644 --- a/stepmania/src/InputFilter.h +++ b/stepmania/src/InputFilter.h @@ -38,6 +38,7 @@ class InputFilter public: void ButtonPressed( const DeviceInput &di, bool Down ); void SetButtonComment( const DeviceInput &di, const RString &sComment = "" ); + void ResetDevice( InputDevice dev ); InputFilter(); ~InputFilter();