diff src/render/SDL_render.c @ 5231:710d00cb3a6a

Made it possible to disable the rendering subsystem with configure --disable-render
author Sam Lantinga <slouken@libsdl.org>
date Tue, 08 Feb 2011 10:04:09 -0800
parents 2178ffe17222
children b530ef003506
line wrap: on
line diff
--- 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