# HG changeset patch # User reimar # Date 1302212946 0 # Node ID 1e637ada90031aefaf14b798fe70cd11ceed8ab3 # Parent a2a32138597bca15816129b60c68fde78454cd7a Avoid MPlayer ignoring a key press completely, instead sending MP_KEY_RELEASE_ALL all the time. diff -r a2a32138597b -r 1e637ada9003 mp_fifo.c --- a/mp_fifo.c Thu Apr 07 21:48:16 2011 +0000 +++ b/mp_fifo.c Thu Apr 07 21:49:06 2011 +0000 @@ -39,6 +39,9 @@ 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 @@ 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){