From 986e519fc9373e2b3dab6f86debcbd7e13466c34 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 29 Apr 2008 12:55:23 +0300 Subject: input: Remove separate mp_input_add_event_fd Use the same mp_input_add_key_fd for all uses and add a context argument to its callback that was before only in the event fd callbacks. Instead of checking in input.c whether keys were inserted to the keypress FIFO during the callback do the check in the callback before returning and set return value accordingly. --- mp_fifo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mp_fifo.c') diff --git a/mp_fifo.c b/mp_fifo.c index 5d0159dfd8..ebb9dccf75 100644 --- a/mp_fifo.c +++ b/mp_fifo.c @@ -23,7 +23,8 @@ static void mplayer_put_key_internal(int code){ key_fifo_write=(key_fifo_write+1)%key_fifo_size; } -int mplayer_get_key(int fd){ +int mplayer_get_key(void *ctx, int fd) +{ int key; // printf("mplayer_get_key(%d)\n",fd); if (key_fifo_data == NULL) -- cgit v1.2.3