fix zero timestamps on reset

warn about zero timestamps
This commit is contained in:
Glenn Maynard
2005-05-17 20:50:39 +00:00
parent fc1847ddc8
commit f8f94844b2
+5 -1
View File
@@ -52,6 +52,9 @@ void InputFilter::ButtonPressed( DeviceInput di, bool Down )
{
LockMut(*queuemutex);
if( di.ts.IsZero() )
LOG->Warn( "InputFilter::ButtonPressed: zero timestamp is invalid" );
ButtonState &bs = m_ButtonState[di.device][di.button];
bs.m_Level = di.level;
@@ -75,8 +78,9 @@ void InputFilter::SetButtonComment( DeviceInput di, const CString &sComment )
/* Release all buttons on the given device. */
void InputFilter::ResetDevice( InputDevice device )
{
RageTimer now;
for( int button = 0; button < GetNumDeviceButtons(device); ++button )
ButtonPressed( DeviceInput(device, button), false );
ButtonPressed( DeviceInput(device, button, -1, now), false );
}
void InputFilter::Update(float fDeltaTime)