diff options
author | wm4 <wm4@nowhere> | 2013-12-21 19:33:45 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 20:50:13 +0100 |
commit | ed71606e65e697ea6bc9fc78caf2dd4089dc0aeb (patch) | |
tree | d3b80546a8e40c821ee7575c236d813021b8b7c8 /video/out/vo.c | |
parent | dadf3a9a46d31a101aeaa1256b0d6f914eb32f1e (diff) | |
download | mpv-ed71606e65e697ea6bc9fc78caf2dd4089dc0aeb.tar.bz2 mpv-ed71606e65e697ea6bc9fc78caf2dd4089dc0aeb.tar.xz |
input: rework how input sources are added
Until now, there were two functions to add input sources (stuff like
stdin input, slave mode, lirc, joystick). Unify them to a single
function (mp_input_add_fd()), and make sure the associated callbacks
always have a context parameter.
Change the lirc and joystick code such that they take store their state
in a context struct (probably worthless), and use the new mp_msg
replacements (the point of this refactoring).
Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in
the terminal handling code.
Diffstat (limited to 'video/out/vo.c')
-rw-r--r-- | video/out/vo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index 8bc4633ecc..c66478bc6d 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -434,8 +434,8 @@ int vo_reconfig(struct vo *vo, struct mp_image_params *params, int flags) if (vo->config_ok) vo->params = talloc_memdup(vo, &p2, sizeof(p2)); if (vo->registered_fd == -1 && vo->event_fd != -1 && vo->config_ok) { - mp_input_add_key_fd(vo->input_ctx, vo->event_fd, 1, event_fd_callback, - NULL, vo); + mp_input_add_fd(vo->input_ctx, vo->event_fd, 1, NULL, event_fd_callback, + NULL, vo); vo->registered_fd = vo->event_fd; } vo->frame_loaded = false; |