diff input/input.c @ 33019:03ed899a72bc

Allow mouse wheel to work with a key fifo size of 2.
author reimar
date Thu, 24 Mar 2011 22:34:23 +0000
parents cc8cef372901
children d63bf64a2094
line wrap: on
line diff
--- a/input/input.c	Thu Mar 24 22:28:17 2011 +0000
+++ b/input/input.c	Thu Mar 24 22:34:23 2011 +0000
@@ -1100,11 +1100,13 @@
   unsigned int j;
   mp_cmd_t* ret;
 
-  if (code == MP_KEY_RELEASE_ALL) {
+  if (code & MP_KEY_RELEASE_ALL) {
+      code &= ~MP_KEY_RELEASE_ALL;
       memset(key_down, 0, sizeof(key_down));
       num_key_down = 0;
       last_key_down = 0;
-      return NULL;
+      if (!code)
+          return NULL;
   }
 
   if(mp_input_key_cb) {