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

reimar subversion at mplayerhq.hu
Thu Apr 7 23:49:06 CEST 2011


Author: reimar
Date: Thu Apr  7 23:49:06 2011
New Revision: 33232

Log:
Avoid MPlayer ignoring a key press completely, instead sending
MP_KEY_RELEASE_ALL all the time.

Modified:
   trunk/mp_fifo.c

Modified: trunk/mp_fifo.c
==============================================================================
--- trunk/mp_fifo.c	Thu Apr  7 23:48:16 2011	(r33231)
+++ trunk/mp_fifo.c	Thu Apr  7 23:49:06 2011	(r33232)
@@ -39,6 +39,9 @@ static void mplayer_put_key_internal(int
     return;
   // in the worst case, just reset key state
   if (fifo_free == 1) {
+    // ensure we do not only create MP_KEY_RELEASE_ALL events
+    if (previous_down_key & MP_KEY_RELEASE_ALL)
+      return;
     // HACK: this ensures that a fifo size of 2 does
     // not queue any key presses while still allowing
     // the mouse wheel to work (which sends down and up
@@ -52,7 +55,7 @@ static void mplayer_put_key_internal(int
   if (code & MP_KEY_DOWN)
     previous_down_key = code & ~MP_KEY_DOWN;
   else
-    previous_down_key = 0;
+    previous_down_key = code & MP_KEY_RELEASE_ALL;
 }
 
 int mplayer_get_key(int fd){


More information about the MPlayer-cvslog mailing list