From b6870cc5ba1c9b43307af26f47ed5bc0c2d5c7de Mon Sep 17 00:00:00 2001 From: ulion Date: Wed, 26 Dec 2007 13:13:48 +0000 Subject: From now on, libmenu does not steal all input keys from input modules. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25530 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 4 ++-- input/input.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'input') diff --git a/input/input.c b/input/input.c index fc3d45cd9e..8e2d30a4dc 100644 --- a/input/input.c +++ b/input/input.c @@ -537,7 +537,7 @@ static mp_cmd_bind_t* cmd_binds_default = NULL; static mp_cmd_filter_t* cmd_filters = NULL; // Callback to allow the menu filter to grab the incoming keys -void (*mp_input_key_cb)(int code) = NULL; +int (*mp_input_key_cb)(int code) = NULL; static mp_input_fd_t key_fds[MP_MAX_KEY_FD]; static unsigned int num_key_fd = 0; @@ -1070,7 +1070,7 @@ interpret_key(int code, int paused) if (code & MP_KEY_DOWN) return NULL; code &= ~(MP_KEY_DOWN|MP_NO_REPEAT_KEY); - mp_input_key_cb(code); + if (mp_input_key_cb(code)) return NULL; } diff --git a/input/input.h b/input/input.h index 780a5d1d88..f07d9142ea 100644 --- a/input/input.h +++ b/input/input.h @@ -207,7 +207,7 @@ typedef int (*mp_cmd_func_t)(int fd,char* dest,int size); typedef void (*mp_close_func_t)(int fd); // Set this to grab all incoming key codes -extern void (*mp_input_key_cb)(int code); +extern int (*mp_input_key_cb)(int code); // Should return 1 if the command was processed typedef int (*mp_input_cmd_filter)(mp_cmd_t* cmd, int paused, void* ctx); -- cgit v1.2.3