[X11] Fix up compilation when EGL headers are not present.
authorGabriel Jacobo <gabomdq@gmail.com>
Mon, 11 Nov 2013 19:17:32 -0300
changeset 7960 904d473b8845
parent 7959 fb3307cd5609
child 7961 c629882e0a81
[X11] Fix up compilation when EGL headers are not present.
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Mon Nov 11 11:12:43 2013 -0300
+++ b/src/video/x11/SDL_x11window.c	Mon Nov 11 19:17:32 2013 -0300
@@ -563,6 +563,7 @@
         && ( !_this->gl_data || ! _this->gl_data->HAS_GLX_EXT_create_context_es2_profile )
 #endif  
     ) {
+#if SDL_VIDEO_OPENGL_EGL  
         if (!_this->egl_data) {
             X11_XDestroyWindow(display, w);
             return -1;
@@ -575,6 +576,9 @@
             X11_XDestroyWindow(display, w);
             return SDL_SetError("Could not create GLES window surface");
         }
+#else
+        return SDL_SetError("Could not create GLES window surface (no EGL support available)");
+#endif /* SDL_VIDEO_OPENGL_EGL */
     }
 #endif