[X11] Fix up compilation when EGL headers are not present.
authorGabriel Jacobo <gabomdq@gmail.com>
Mon, 11 Nov 2013 19:17:32 -0300
changeset 7960904d473b8845
parent 7959 fb3307cd5609
child 7961 c629882e0a81
[X11] Fix up compilation when EGL headers are not present.
src/video/x11/SDL_x11window.c
     1.1 --- a/src/video/x11/SDL_x11window.c	Mon Nov 11 11:12:43 2013 -0300
     1.2 +++ b/src/video/x11/SDL_x11window.c	Mon Nov 11 19:17:32 2013 -0300
     1.3 @@ -563,6 +563,7 @@
     1.4          && ( !_this->gl_data || ! _this->gl_data->HAS_GLX_EXT_create_context_es2_profile )
     1.5  #endif  
     1.6      ) {
     1.7 +#if SDL_VIDEO_OPENGL_EGL  
     1.8          if (!_this->egl_data) {
     1.9              X11_XDestroyWindow(display, w);
    1.10              return -1;
    1.11 @@ -575,6 +576,9 @@
    1.12              X11_XDestroyWindow(display, w);
    1.13              return SDL_SetError("Could not create GLES window surface");
    1.14          }
    1.15 +#else
    1.16 +        return SDL_SetError("Could not create GLES window surface (no EGL support available)");
    1.17 +#endif /* SDL_VIDEO_OPENGL_EGL */
    1.18      }
    1.19  #endif
    1.20