changeset 34843:ec5d1147164e

Change if() condition into #if. This avoids compile issues with some older SDL versions.
author reimar
date Sun, 20 May 2012 17:38:18 +0000
parents a31ac47eba39
children 60cb31e9e55d
files libvo/sdl_common.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/sdl_common.c	Sun May 20 16:09:56 2012 +0000
+++ b/libvo/sdl_common.c	Sun May 20 17:38:18 2012 +0000
@@ -45,12 +45,13 @@
 static void get_screensize(void) {
     const SDL_VideoInfo *vi;
     // TODO: better to use a check that gets the runtime version instead?
-    if (!SDL_VERSION_ATLEAST(1, 2, 10)) return;
+#if SDL_VERSION_ATLEAST(1, 2, 10)
     // Keep user-provided settings
     if (vo_screenwidth > 0 || vo_screenheight > 0) return;
     vi = SDL_GetVideoInfo();
     vo_screenwidth  = vi->current_w;
     vo_screenheight = vi->current_h;
+#endif
 }
 
 int vo_sdl_init(void)