diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-29 12:55:23 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-29 12:55:23 +0300 |
commit | 986e519fc9373e2b3dab6f86debcbd7e13466c34 (patch) | |
tree | 928eb75d2e6e5685fa468efe4e074a6825a197b9 /input/ar.c | |
parent | b6b82964aa3f9ba93f6f284ed97c278743f50fce (diff) | |
download | mpv-986e519fc9373e2b3dab6f86debcbd7e13466c34.tar.bz2 mpv-986e519fc9373e2b3dab6f86debcbd7e13466c34.tar.xz |
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.
Diffstat (limited to 'input/ar.c')
-rw-r--r-- | input/ar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/input/ar.c b/input/ar.c index 7347b4c326..0f48a50716 100644 --- a/input/ar.c +++ b/input/ar.c @@ -321,7 +321,7 @@ int is_mplayer_front() return 0; } -int mp_input_ar_read(int fd) +int mp_input_ar_read(void *ctx, int fd) { int i, down = 0; int ret = MP_INPUT_NOTHING; @@ -445,7 +445,7 @@ int main(void) } while (1) { - switch ((ret = mp_input_ar_read(0)) & ~MP_KEY_DOWN) { + switch ((ret = mp_input_ar_read(NULL, 0)) & ~MP_KEY_DOWN) { case AR_PLAY: printf(" - AR_PLAY."); break; case AR_PLAY_HOLD: printf(" - AR_PLAY_HOLD."); break; case AR_NEXT: printf(" - AR_NEXT."); break; |