src/video/x11/SDL_x11window.c
changeset 6188 e82023802002
parent 6167 c071e1372341
child 6275 963497e37d34
--- a/src/video/x11/SDL_x11window.c	Sun Jan 08 01:15:20 2012 -0500
+++ b/src/video/x11/SDL_x11window.c	Sun Jan 08 02:23:37 2012 -0500
@@ -31,7 +31,7 @@
 #include "SDL_x11mouse.h"
 #include "SDL_x11shape.h"
 
-#ifdef SDL_VIDEO_DRIVER_PANDORA
+#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
 #include "SDL_x11opengles.h"
 #endif
 
@@ -289,7 +289,7 @@
         XFree(vinfo);
     } else
 #endif
-#ifdef SDL_VIDEO_DRIVER_PANDORA
+#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
     if (window->flags & SDL_WINDOW_OPENGL) {
         XVisualInfo *vinfo;
 
@@ -401,17 +401,19 @@
         SDL_SetError("Couldn't create window");
         return -1;
     }
-#if SDL_VIDEO_DRIVER_PANDORA
-    /* Create the GLES window surface */
-    _this->gles_data->egl_surface =
-        _this->gles_data->eglCreateWindowSurface(_this->gles_data->
+#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
+    if (window->flags & SDL_WINDOW_OPENGL) {
+        /* Create the GLES window surface */
+        _this->gles_data->egl_surface =
+            _this->gles_data->eglCreateWindowSurface(_this->gles_data->
                                                  egl_display,
                                                  _this->gles_data->egl_config,
                                                  (NativeWindowType) w, NULL);
 
-    if (_this->gles_data->egl_surface == EGL_NO_SURFACE) {
-        SDL_SetError("Could not create GLES window surface");
-        return -1;
+        if (_this->gles_data->egl_surface == EGL_NO_SURFACE) {
+            SDL_SetError("Could not create GLES window surface");
+            return -1;
+        }
     }
 #endif