filter in InputQueue

This commit is contained in:
Glenn Maynard
2007-03-15 20:49:44 +00:00
parent 9bfb1a7c4f
commit 1a987c9f71
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -18,6 +18,11 @@ InputQueue::InputQueue()
void InputQueue::RememberInput( const InputEventPlus &iep )
{
if( !iep.GameI.IsValid() )
return;
if( iep.type != IET_FIRST_PRESS )
return;
int c = iep.GameI.controller;
if( m_aQueue[c].size() >= MAX_INPUT_QUEUE_LENGTH ) // full
m_aQueue[c].erase( m_aQueue[c].begin(), m_aQueue[c].begin() + (m_aQueue[c].size()-MAX_INPUT_QUEUE_LENGTH+1) );