diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-30 11:06:55 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-30 14:46:17 +0300 |
commit | bfcb3a7a8130be478103beb1923567f5e5d86c67 (patch) | |
tree | e8a376f6cebf586fff714f1b49b83c0e695b0cdb /libvo/video_out.c | |
parent | 32e52b8fd0b917a40a9192770cc1a41aa31b34d0 (diff) | |
download | mpv-bfcb3a7a8130be478103beb1923567f5e5d86c67.tar.bz2 mpv-bfcb3a7a8130be478103beb1923567f5e5d86c67.tar.xz |
input: Move key filedescriptor list to context struct
The context variable is now passed to VOs too as it's now needed to
add a callback on the X filedescriptor.
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r-- | libvo/video_out.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c index 78f1f71743..42354c5f34 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -294,11 +294,18 @@ void list_video_out(void) } struct vo *init_best_video_out(struct MPOpts *opts, struct vo_x11_state *x11, - struct mp_fifo *key_fifo) + struct mp_fifo *key_fifo, + struct input_ctx *input_ctx) { char **vo_list = opts->video_driver_list; int i; struct vo *vo = talloc_ptrtype(NULL, vo); + struct vo initial_values = { + .opts = opts, + .x11 = x11, + .key_fifo = key_fifo, + .input_ctx = input_ctx, + }; // first try the preferred drivers, with their optional subdevice param: if (vo_list && vo_list[0]) while (vo_list[0][0]) { @@ -317,8 +324,7 @@ struct vo *init_best_video_out(struct MPOpts *opts, struct vo_x11_state *x11, const vo_info_t *info = video_driver->info; if (!strcmp(info->short_name, name)) { // name matches, try it - *vo = (struct vo){.opts = opts, .x11 = x11, - .key_fifo = key_fifo}; + *vo = initial_values; vo->driver = video_driver; if (!vo_preinit(vo, vo_subdevice)) { free(name); @@ -336,7 +342,7 @@ struct vo *init_best_video_out(struct MPOpts *opts, struct vo_x11_state *x11, vo_subdevice = NULL; for (i = 0; video_out_drivers[i]; i++) { const struct vo_driver *video_driver = video_out_drivers[i]; - *vo = (struct vo){.opts = opts, .x11 = x11, key_fifo = key_fifo}; + *vo = initial_values; vo->driver = video_driver; if (!vo_preinit(vo, vo_subdevice)) return vo; // success! |