src/render/SDL_render.c
changeset 5226 710d00cb3a6a
parent 5224 2178ffe17222
child 5262 b530ef003506
--- a/src/render/SDL_render.c	Mon Feb 07 22:57:33 2011 -0800
+++ b/src/render/SDL_render.c	Tue Feb 08 10:04:09 2011 -0800
@@ -45,6 +45,7 @@
 
 
 static const SDL_RenderDriver *render_drivers[] = {
+#if !SDL_RENDER_DISABLED
 #if SDL_VIDEO_RENDER_D3D
     &D3D_RenderDriver,
 #endif
@@ -61,6 +62,7 @@
     &DirectFB_RenderDriver,
 #endif
     &SW_RenderDriver
+#endif /* !SDL_RENDER_DISABLED */
 };
 static char renderer_magic;
 static char texture_magic;
@@ -170,7 +172,12 @@
 SDL_Renderer *
 SDL_CreateSoftwareRenderer(SDL_Surface * surface)
 {
+#if !SDL_RENDER_DISABLED
     return SW_CreateRendererForSurface(surface);
+#else
+    SDL_SetError("SDL not built with rendering support");
+    return NULL;
+#endif /* !SDL_RENDER_DISABLED */
 }
 
 int