diff --git a/stepmania/src/InputFilter.cpp b/stepmania/src/InputFilter.cpp index 42c48b3d6c..d5f94010c4 100644 --- a/stepmania/src/InputFilter.cpp +++ b/stepmania/src/InputFilter.cpp @@ -40,6 +40,13 @@ void InputFilter::ButtonPressed( DeviceInput di, bool Down ) queue.push_back( InputEvent(di,iet) ); } +/* Release all buttons on the given device. */ +void InputFilter::ResetDevice( InputDevice dev ) +{ + for( int button = 0; button < NUM_DEVICE_BUTTONS; ++button ) + ButtonPressed( DeviceInput(dev, button), false ); +} + void InputFilter::Update(float fDeltaTime) { INPUTMAN->Update( fDeltaTime ); diff --git a/stepmania/src/InputFilter.h b/stepmania/src/InputFilter.h index 749e1255ba..491459f414 100644 --- a/stepmania/src/InputFilter.h +++ b/stepmania/src/InputFilter.h @@ -44,6 +44,8 @@ class InputFilter public: void ButtonPressed( DeviceInput di, bool Down ); + void ResetDevice( InputDevice dev ); + InputFilter(); void Update(float fDeltaTime);