Depend on XRender version 0.10 or above and XFixes version 2.0 or above. Moved these dependency checks into CheckXRender() and CheckXFixes().
authorSunny Sachanandani <sunnysachanandani@gmail.com>
Wed, 28 Jul 2010 15:33:28 +0530
changeset 4623 10175d54adf4
parent 4622 453712fd2016
child 4624 b70b99ab75b8
Depend on XRender version 0.10 or above and XFixes version 2.0 or above. Moved these dependency checks into CheckXRender() and CheckXFixes().
src/video/x11/SDL_x11render.c
--- a/src/video/x11/SDL_x11render.c	Wed Jul 28 15:13:16 2010 +0530
+++ b/src/video/x11/SDL_x11render.c	Wed Jul 28 15:33:28 2010 +0530
@@ -204,6 +204,10 @@
         return SDL_FALSE;
     }
 
+    if (major != 0 || minor < 10) {
+        return SDL_FALSE;
+    }
+
     return SDL_TRUE;
 }
 #endif
@@ -230,6 +234,10 @@
         return SDL_FALSE;
     }
 
+    if (major < 2) {
+        return SDL_FALSE;
+    }
+
     return SDL_TRUE;
 }
 #endif
@@ -397,8 +405,7 @@
 #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE
     if (CheckXDamage(data->display, &major, &minor)) {
         if (CheckXFixes(data->display, &major, &minor)) {
-            if (major >= 2)
-                data->use_xdamage = SDL_TRUE;
+            data->use_xdamage = SDL_TRUE;
         }
     }
 #endif