changeset 36520:1be891d42dc9

vo_sdl: Avoid setenv code duplication.
author reimar
date Sat, 18 Jan 2014 23:08:31 +0000
parents a76b46200616
children 93bf67487627
files libvo/vo_sdl.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_sdl.c	Sat Jan 18 23:08:29 2014 +0000
+++ b/libvo/vo_sdl.c	Sat Jan 18 23:08:31 2014 +0000
@@ -1293,12 +1293,10 @@
     }
 
     /* does the user want SDL to try and force Xv */
-    if(sdl_forcexv)	setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "1", 1);
-    else setenv("SDL_VIDEO_X11_NODIRECTCOLOR", "0", 1);
+    setenv("SDL_VIDEO_X11_NODIRECTCOLOR", sdl_forcexv ? "1" : "0", 1);
 
     /* does the user want to disable Xv and use software scaling instead */
-    if(sdl_hwaccel) setenv("SDL_VIDEO_YUV_HWACCEL", "1", 1);
-    else setenv("SDL_VIDEO_YUV_HWACCEL", "0", 1);
+    setenv("SDL_VIDEO_YUV_HWACCEL", sdl_hwaccel ? "1" : "0", 1);
 
     /* default to no fullscreen mode, we'll set this as soon we have the avail. modes */
     priv->fullmode = -2;