src/video/SDL_video.c
changeset 5168 db487f28419e
parent 5166 4d39eeaad00b
child 5169 ededa1ccf91c
--- a/src/video/SDL_video.c	Thu Feb 03 16:57:38 2011 -0800
+++ b/src/video/SDL_video.c	Thu Feb 03 17:42:58 2011 -0800
@@ -126,7 +126,19 @@
 
     renderer = data->renderer;
     if (!renderer) {
-        renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
+        SDL_RendererInfo info;
+        int i;
+
+        /* We need to make sure we don't get a software renderer */
+        for (i = 0; i < SDL_GetNumRenderDrivers(); ++i) {
+            SDL_GetRenderDriverInfo(i, &info);
+            if (SDL_strcmp(info.name, "software") != 0) {
+                renderer = SDL_CreateRenderer(window, i, 0);
+                if (renderer) {
+                    break;
+                }
+            }
+        }
         if (!renderer) {
             return -1;
         }