diff input/input.c @ 28835:6f5824a39ada

Make pausing_keep_force the default for the set_mouse_pos and key_down_event - different behaviour is unlikely to make sense but it is better to handle this in input.c instead of adding special cases to mplayer.c and being able to override the default behaviour at least should not hurt.
author reimar
date Sat, 07 Mar 2009 13:25:55 +0000
parents 142c53391eb7
children 9a5655b78698
line wrap: on
line diff
--- a/input/input.c	Sat Mar 07 12:50:52 2009 +0000
+++ b/input/input.c	Sat Mar 07 13:25:55 2009 +0000
@@ -767,7 +767,7 @@
 mp_cmd_t*
 mp_input_parse_cmd(char* str) {
   int i,l;
-  int pausing = 0;
+  int pausing = -1;
   char *ptr,*e;
   mp_cmd_t *cmd;
   const mp_cmd_t *cmd_def;
@@ -817,6 +817,15 @@
   cmd = calloc(1, sizeof(mp_cmd_t));
   cmd->id = cmd_def->id;
   cmd->name = strdup(cmd_def->name);
+  if (pausing == -1) {
+    switch (cmd->id) {
+      case MP_CMD_KEYDOWN_EVENTS:
+      case MP_CMD_SET_MOUSE_POS:
+        pausing = 4; break;
+      default:
+        pausing = 0; break;
+    }
+  }
   cmd->pausing = pausing;
 
   ptr = str;