diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-02 00:18:43 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-02 00:18:43 +0000 |
commit | e37643a0929038587a8517a266c4f20806542788 (patch) | |
tree | 1805136d061a087ff88939922c6334601ff4fda6 | |
parent | 401c95b421c60b8d46485a0cb29991974b2c8190 (diff) | |
download | xine-lib-e37643a0929038587a8517a266c4f20806542788.tar.gz xine-lib-e37643a0929038587a8517a266c4f20806542788.tar.bz2 |
Convert xshm_set_property() from if() chain to switch block.
-rw-r--r-- | src/video_out/video_out_xcbshm.c | 24 | ||||
-rw-r--r-- | src/video_out/video_out_xshm.c | 24 |
2 files changed, 22 insertions, 26 deletions
diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index bb19058f5..9895d1852 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003, 2007 the xine project + * Copyright (C) 2000-2003, 2007-2008 the xine project * * This file is part of xine, a free video player. * @@ -750,45 +750,43 @@ static int xshm_set_property (vo_driver_t *this_gen, int property, int value) { xshm_driver_t *this = (xshm_driver_t *) this_gen; - if ( property == VO_PROP_ASPECT_RATIO) { - + switch (property) { + case VO_PROP_ASPECT_RATIO: if (value>=XINE_VO_ASPECT_NUM_RATIOS) value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); + break; - } else if (property == VO_PROP_BRIGHTNESS) { - + case VO_PROP_BRIGHTNESS: this->yuv2rgb_brightness = value; this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, this->yuv2rgb_contrast, this->yuv2rgb_saturation); - this->sc.force_redraw = 1; + break; - } else if (property == VO_PROP_CONTRAST) { - + case VO_PROP_CONTRAST: this->yuv2rgb_contrast = value; this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, this->yuv2rgb_contrast, this->yuv2rgb_saturation); - this->sc.force_redraw = 1; + break; - } else if (property == VO_PROP_SATURATION) { - + case VO_PROP_SATURATION: this->yuv2rgb_saturation = value; this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, this->yuv2rgb_contrast, this->yuv2rgb_saturation); - this->sc.force_redraw = 1; + break; - } else { + default: xprintf (this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": tried to set unsupported property %d\n", property); } diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index ecaf61f06..7801bb03b 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2003, 2008 the xine project * * This file is part of xine, a free video player. * @@ -839,45 +839,43 @@ static int xshm_set_property (vo_driver_t *this_gen, int property, int value) { xshm_driver_t *this = (xshm_driver_t *) this_gen; - if ( property == VO_PROP_ASPECT_RATIO) { - + switch (property) { + case VO_PROP_ASPECT_RATIO: if (value>=XINE_VO_ASPECT_NUM_RATIOS) value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name_table[value]); + break; - } else if (property == VO_PROP_BRIGHTNESS) { - + case VO_PROP_BRIGHTNESS: this->yuv2rgb_brightness = value; this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, this->yuv2rgb_contrast, this->yuv2rgb_saturation); - this->sc.force_redraw = 1; + break; - } else if (property == VO_PROP_CONTRAST) { - + case VO_PROP_CONTRAST: this->yuv2rgb_contrast = value; this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, this->yuv2rgb_contrast, this->yuv2rgb_saturation); - this->sc.force_redraw = 1; + break; - } else if (property == VO_PROP_SATURATION) { - + case VO_PROP_SATURATION: this->yuv2rgb_saturation = value; this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory, this->yuv2rgb_brightness, this->yuv2rgb_contrast, this->yuv2rgb_saturation); - this->sc.force_redraw = 1; + break; - } else { + default: xprintf (this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": tried to set unsupported property %d\n", property); } |