diff src/video/SDL_video.c @ 3489:e1bd98b56e94

Override renderer for OpenGL window, only in case if OpenGL or OpenGL ES renderers are enabled.
author Mike Gorchak <lestat@i.com.ua>
date Tue, 24 Nov 2009 19:28:27 +0000
parents 3d2f42580488
children 4b594623401b
line wrap: on
line diff
--- a/src/video/SDL_video.c	Tue Nov 24 16:43:18 2009 +0000
+++ b/src/video/SDL_video.c	Tue Nov 24 19:28:27 2009 +0000
@@ -1493,9 +1493,16 @@
         char *override = SDL_getenv("SDL_VIDEO_RENDERER");
         int n = SDL_GetNumRenderDrivers();
 
+#if SDL_VIDEO_RENDER_OGL
         if (!override && (window->flags & SDL_WINDOW_OPENGL)) {
             override = "opengl";
         }
+#endif /* SDL_VIDEO_RENDER_OGL */
+#if SDL_VIDEO_RENDER_OGL_ES
+        if (!override && (window->flags & SDL_WINDOW_OPENGL)) {
+            override = "opengl_es";
+        }
+#endif /* SDL_VIDEO_RENDER_OGL_ES */
         if (override) {
             for (index = 0; index < n; ++index) {
                 SDL_RenderDriver *driver =