revert "simplify"; this removed an API call

This commit is contained in:
Glenn Maynard
2006-09-08 18:59:57 +00:00
parent 9e3f9f6fb3
commit 897c1c9057
2 changed files with 19 additions and 7 deletions
+18 -7
View File
@@ -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<NUM_INPUT_DEVICES; i++ )
ResetDevice( InputDevice(i) );
}
void InputFilter::SetRepeatRate( float fSlowDelay, float fFastDelay, float fRepeatRate )
@@ -152,6 +147,22 @@ void InputFilter::SetButtonComment( const DeviceInput &di, const RString &sComme
bs.m_sComment = sComment;
}
/* Release all buttons on the given device. */
void InputFilter::ResetDevice( InputDevice device )
{
LockMut(*queuemutex);
RageTimer now;
vector<DeviceInput> 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 )
{