[MPlayer-cvslog] r33105 - trunk/mp_fifo.c

reimar subversion at mplayerhq.hu
Thu Mar 24 23:28:18 CET 2011


Author: reimar
Date: Thu Mar 24 23:28:17 2011
New Revision: 33105

Log:
Change condition to avoid needless key state resets with very small
key fifos.

Modified:
   trunk/mp_fifo.c

Modified: trunk/mp_fifo.c
==============================================================================
--- trunk/mp_fifo.c	Thu Mar 24 23:11:18 2011	(r33104)
+++ trunk/mp_fifo.c	Thu Mar 24 23:28:17 2011	(r33105)
@@ -33,7 +33,8 @@ static void mplayer_put_key_internal(int
     key_fifo_data = malloc(key_fifo_size * sizeof(int));
   if(!fifo_free) return; // FIFO FULL!!
   // reserve some space for key release events to avoid stuck keys
-  if((code & MP_KEY_DOWN) && fifo_free < (key_fifo_size >> 1))
+  // Make sure we do not reset key state because of a down event
+  if((code & MP_KEY_DOWN) && fifo_free <= (key_fifo_size >> 1))
     return;
   // in the worst case, just reset key state
   if (fifo_free == 1)


More information about the MPlayer-cvslog mailing list