From bfcb3a7a8130be478103beb1923567f5e5d86c67 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 30 Apr 2008 11:06:55 +0300 Subject: 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. --- libvo/video_out.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'libvo/video_out.c') 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! -- cgit v1.2.3