summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_out/video_out_xcbshm.c24
-rw-r--r--src/video_out/video_out_xshm.c24
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);
}