use g_ButtonStates instead of GetPressedButtons; GetPressedButtons returns the last reported input, not the immediate state

This commit is contained in:
Glenn Maynard
2006-09-08 19:02:11 +00:00
parent 897c1c9057
commit c628676660
+5 -6
View File
@@ -153,13 +153,12 @@ void InputFilter::ResetDevice( InputDevice device )
LockMut(*queuemutex);
RageTimer now;
vector<DeviceInput> DeviceInputs;
GetPressedButtons( DeviceInputs );
FOREACH( DeviceInput, DeviceInputs, di )
const ButtonStateMap g_ButtonStates( g_ButtonStates );
FOREACHM_CONST( DeviceInput, ButtonState, g_ButtonStates, b )
{
if( di->device == device )
ButtonPressed( DeviceInput(device, di->button, -1, now), false );
const DeviceInput &di = b->first;
if( di.device == device )
ButtonPressed( DeviceInput(device, di.button, -1, now), false );
}
}