simplify
This commit is contained in:
@@ -60,15 +60,10 @@ void InputFilter::ButtonPressed( DeviceInput di, bool Down )
|
|||||||
if( bs.m_BeingHeld == Down )
|
if( bs.m_BeingHeld == Down )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const bool WasBeingPressed = IsBeingPressed( di );
|
|
||||||
|
|
||||||
bs.m_BeingHeld = Down;
|
bs.m_BeingHeld = Down;
|
||||||
bs.m_fSecsHeld = 0;
|
bs.m_fSecsHeld = 0;
|
||||||
if( WasBeingPressed != IsBeingPressed(di) )
|
|
||||||
{
|
queue.push_back( InputEvent(di,Down? IET_FIRST_PRESS:IET_RELEASE) );
|
||||||
InputEventType iet = IsBeingPressed(di)? IET_FIRST_PRESS:IET_RELEASE;
|
|
||||||
queue.push_back( InputEvent(di,iet) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release all buttons on the given device. */
|
/* Release all buttons on the given device. */
|
||||||
|
|||||||
Reference in New Issue
Block a user