src/video/x11/SDL_x11window.c
changeset 6188 e82023802002
parent 6167 c071e1372341
child 6275 963497e37d34
     1.1 --- a/src/video/x11/SDL_x11window.c	Sun Jan 08 01:15:20 2012 -0500
     1.2 +++ b/src/video/x11/SDL_x11window.c	Sun Jan 08 02:23:37 2012 -0500
     1.3 @@ -31,7 +31,7 @@
     1.4  #include "SDL_x11mouse.h"
     1.5  #include "SDL_x11shape.h"
     1.6  
     1.7 -#ifdef SDL_VIDEO_DRIVER_PANDORA
     1.8 +#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
     1.9  #include "SDL_x11opengles.h"
    1.10  #endif
    1.11  
    1.12 @@ -289,7 +289,7 @@
    1.13          XFree(vinfo);
    1.14      } else
    1.15  #endif
    1.16 -#ifdef SDL_VIDEO_DRIVER_PANDORA
    1.17 +#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
    1.18      if (window->flags & SDL_WINDOW_OPENGL) {
    1.19          XVisualInfo *vinfo;
    1.20  
    1.21 @@ -401,17 +401,19 @@
    1.22          SDL_SetError("Couldn't create window");
    1.23          return -1;
    1.24      }
    1.25 -#if SDL_VIDEO_DRIVER_PANDORA
    1.26 -    /* Create the GLES window surface */
    1.27 -    _this->gles_data->egl_surface =
    1.28 -        _this->gles_data->eglCreateWindowSurface(_this->gles_data->
    1.29 +#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
    1.30 +    if (window->flags & SDL_WINDOW_OPENGL) {
    1.31 +        /* Create the GLES window surface */
    1.32 +        _this->gles_data->egl_surface =
    1.33 +            _this->gles_data->eglCreateWindowSurface(_this->gles_data->
    1.34                                                   egl_display,
    1.35                                                   _this->gles_data->egl_config,
    1.36                                                   (NativeWindowType) w, NULL);
    1.37  
    1.38 -    if (_this->gles_data->egl_surface == EGL_NO_SURFACE) {
    1.39 -        SDL_SetError("Could not create GLES window surface");
    1.40 -        return -1;
    1.41 +        if (_this->gles_data->egl_surface == EGL_NO_SURFACE) {
    1.42 +            SDL_SetError("Could not create GLES window surface");
    1.43 +            return -1;
    1.44 +        }
    1.45      }
    1.46  #endif
    1.47