diff options
Diffstat (limited to 'libvo/vo_dxr3.c')
-rw-r--r-- | libvo/vo_dxr3.c | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index 46ab3468ea..74250b382c 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -177,7 +177,7 @@ static overlay_t *overlay_data; /* Functions for working with the em8300's internal clock */ /* End of internal clock functions */ -static int control(uint32_t request, void *data, ...) +static int control(uint32_t request, void *data) { switch (request) { case VOCTRL_GUISUPPORT: @@ -255,22 +255,17 @@ static int control(uint32_t request, void *data, ...) } case VOCTRL_SET_EQUALIZER: { - va_list ap; - int value; em8300_bcs_t bcs; - - va_start(ap, data); - value = va_arg(ap, int); - va_end(ap); + struct voctrl_set_equalizer_args *args = data; if (ioctl(fd_control, EM8300_IOCTL_GETBCS, &bcs) < 0) return VO_FALSE; - if (!strcasecmp(data, "brightness")) - bcs.brightness = (value+100)*5; - else if (!strcasecmp(data, "contrast")) - bcs.contrast = (value+100)*5; - else if (!strcasecmp(data, "saturation")) - bcs.saturation = (value+100)*5; + if (!strcasecmp(args->name, "brightness")) + bcs.brightness = (args->value+100)*5; + else if (!strcasecmp(args->name, "contrast")) + bcs.contrast = (args->value+100)*5; + else if (!strcasecmp(args->name, "saturation")) + bcs.saturation = (args->value+100)*5; else return VO_FALSE; if (ioctl(fd_control, EM8300_IOCTL_SETBCS, &bcs) < 0) @@ -279,23 +274,18 @@ static int control(uint32_t request, void *data, ...) } case VOCTRL_GET_EQUALIZER: { - va_list ap; - int *value; em8300_bcs_t bcs; + struct voctrl_get_equalizer_args *args = data; - va_start(ap, data); - value = va_arg(ap, int*); - va_end(ap); - if (ioctl(fd_control, EM8300_IOCTL_GETBCS, &bcs) < 0) return VO_FALSE; - if (!strcasecmp(data, "brightness")) - *value = (bcs.brightness/5)-100; - else if (!strcasecmp(data, "contrast")) - *value = (bcs.contrast/5)-100; - else if (!strcasecmp(data, "saturation")) - *value = (bcs.saturation/5)-100; + if (!strcasecmp(args->name, "brightness")) + *args->valueptr = (bcs.brightness/5)-100; + else if (!strcasecmp(args->name, "contrast")) + *args->valueptr = (bcs.contrast/5)-100; + else if (!strcasecmp(args->name, "saturation")) + *args->valueptr = (bcs.saturation/5)-100; else return VO_FALSE; return VO_TRUE; @@ -325,7 +315,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ { int tmp1, tmp2, size; em8300_register_t reg; - extern float monitor_aspect; /* Softzoom turned on, downscale */ /* This activates the subpicture processor, you can safely disable this and still send */ |