Fixed compiling without XRender enabled
authorSam Lantinga <slouken@libsdl.org>
Wed, 28 Jul 2010 01:14:48 -0700
changeset 4620 f4a93bde905f
parent 4619 b9a205e6369f
child 4621 12a9cf73596a
Fixed compiling without XRender enabled
src/video/x11/SDL_x11render.c
--- a/src/video/x11/SDL_x11render.c	Wed Jul 28 01:05:58 2010 -0700
+++ b/src/video/x11/SDL_x11render.c	Wed Jul 28 01:14:48 2010 -0700
@@ -1038,7 +1038,7 @@
 static int
 X11_SetTextureRGBAMod(SDL_Renderer * renderer, SDL_Texture * texture)
 {
-
+#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
     X11_TextureData *data = (X11_TextureData *) texture->driverdata;
     X11_RenderData *renderdata = (X11_RenderData *) renderer->driverdata;
 
@@ -1094,11 +1094,14 @@
         }
 
         return 0;
-    }
-    else {
+    } else {
         SDL_Unsupported();
         return -1;
     }
+#else
+    SDL_Unsupported();
+    return -1;
+#endif
 }
 
 static int
@@ -1314,6 +1317,7 @@
         return SDL_MapRGBA(&data->format, r, g, b, a);
 }
 
+#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
 static XRenderColor
 xrenderdrawcolor(SDL_Renderer *renderer)
 {
@@ -1328,6 +1332,7 @@
     }
     return xrender_color;
 }
+#endif
 
 static int
 X11_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points,