Better error messaging when SDL can't create a window surface.
authorSam Lantinga <slouken@libsdl.org>
Sat, 07 Jan 2012 14:21:22 -0500
changeset 6174 5f221b7a5952
parent 6172 062ce1e65f6e
child 6175 42c40787f382
Better error messaging when SDL can't create a window surface.
src/render/SDL_render.c
src/video/SDL_video.c
--- a/src/render/SDL_render.c	Sat Jan 07 03:22:47 2012 -0500
+++ b/src/render/SDL_render.c	Sat Jan 07 14:21:22 2012 -0500
@@ -67,9 +67,6 @@
     &SW_RenderDriver
 #endif /* !SDL_RENDER_DISABLED */
 };
-/* If this triggers you may need to install OpenGL development environment */
-SDL_COMPILE_TIME_ASSERT(HAS_RENDER_DRIVERS, SDL_arraysize(render_drivers) > 0);
-
 static char renderer_magic;
 static char texture_magic;
 
--- a/src/video/SDL_video.c	Sat Jan 07 03:22:47 2012 -0500
+++ b/src/video/SDL_video.c	Sat Jan 07 14:21:22 2012 -0500
@@ -239,6 +239,7 @@
             }
         }
         if (!renderer) {
+            SDL_SetError("No hardware accelerated renderers available");
             return -1;
         }