Simplify.

This commit is contained in:
Steve Checkoway
2006-09-08 05:05:42 +00:00
parent d9e7fc0ecd
commit f89680bf06
2 changed files with 7 additions and 19 deletions
+7 -18
View File
@@ -90,8 +90,13 @@ InputFilter::~InputFilter()
void InputFilter::Reset()
{
for( int i=0; i<NUM_INPUT_DEVICES; i++ )
ResetDevice( InputDevice(i) );
LockMut(*queuemutex);
RageTimer now;
DeviceInputList vDeviceInputs;
GetPressedButtons( vDeviceInputs );
FOREACH_CONST( DeviceInput, vDeviceInputs, di )
ButtonPressed( DeviceInput(di->device, di->button, -1, now), false );
}
void InputFilter::SetRepeatRate( float fSlowDelay, float fFastDelay, float fRepeatRate )
@@ -150,22 +155,6 @@ 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 )
{
-1
View File
@@ -44,7 +44,6 @@ class InputFilter
public:
void ButtonPressed( const DeviceInput &di, bool Down );
void SetButtonComment( const DeviceInput &di, const RString &sComment = "" );
void ResetDevice( InputDevice dev );
InputFilter();
~InputFilter();