Simplify.
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user