From 062f66bbcaa4ae449aec5068f0fc67d0ced04654 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 Mar 2009 13:25:55 +0000 Subject: 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28870 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'input') diff --git a/input/input.c b/input/input.c index dcbeb2b11d..a12dd27958 100644 --- a/input/input.c +++ b/input/input.c @@ -767,7 +767,7 @@ int mp_input_parse_and_queue_cmds(const char *str) { 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 @@ mp_input_parse_cmd(char* str) { 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; -- cgit v1.2.3 From 4a5c933303a85cce089ee46ef93f2b9e176e12f7 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 8 Mar 2009 09:14:30 +0000 Subject: Add an option to disable the default key binding that MPlayer includes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28878 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'input') diff --git a/input/input.c b/input/input.c index a12dd27958..6d73be1b3e 100644 --- a/input/input.c +++ b/input/input.c @@ -583,6 +583,7 @@ static mp_cmd_t* ar_cmd = NULL; static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0; static int use_joystick = 1, use_lirc = 1, use_lircc = 1; +static int default_binds = 1; static char* config_file = "input.conf"; /* Apple Remote */ @@ -611,6 +612,8 @@ static m_option_t input_conf[] = { { "cmdlist", mp_input_print_cmd_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL }, { "js-dev", &js_dev, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL }, { "file", &in_file, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL }, + { "default-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL }, + { "nodefault-binds", &default_binds, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL }, { NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -1078,7 +1081,7 @@ mp_input_get_cmd_from_keys(int n,int* keys, int paused) { cmd = mp_input_find_bind_for_key(cmd_binds,n,keys); if(cmd_binds_default && cmd == NULL) cmd = mp_input_find_bind_for_key(cmd_binds_default,n,keys); - if(cmd == NULL) + if(default_binds && cmd == NULL) cmd = mp_input_find_bind_for_key(def_cmd_binds,n,keys); if(cmd == NULL) { -- cgit v1.2.3