diff input/input.c @ 33017:cc8cef372901

Make "stuck keys" problem impossibly by resetting the internal key state when our key fifo overflowed.
author reimar
date Thu, 24 Mar 2011 22:11:18 +0000
parents 0c5bb45690ea
children 03ed899a72bc
line wrap: on
line diff
--- a/input/input.c	Thu Mar 24 21:58:06 2011 +0000
+++ b/input/input.c	Thu Mar 24 22:11:18 2011 +0000
@@ -1100,6 +1100,13 @@
   unsigned int j;
   mp_cmd_t* ret;
 
+  if (code == MP_KEY_RELEASE_ALL) {
+      memset(key_down, 0, sizeof(key_down));
+      num_key_down = 0;
+      last_key_down = 0;
+      return NULL;
+  }
+
   if(mp_input_key_cb) {
       if (code & MP_KEY_DOWN)
 	  return NULL;