[SDL] X11+GL: Allow Visual override for GL windows.
authorpgriffais@spaceport
Tue, 10 Sep 2013 18:25:13 -0700
changeset 7737e9d463cb5b49
parent 7736 84d89d60908f
child 7738 10981a646a6d
[SDL] X11+GL: Allow Visual override for GL windows.

SDL provides an SDL_VIDEO_X11_VISUALID environment variable that lets you override
window visuals, but it wasn't being checked for OpenGL windows.

CR: Sam.
src/video/x11/SDL_x11window.c
     1.1 --- a/src/video/x11/SDL_x11window.c	Sat Sep 07 13:57:20 2013 -0400
     1.2 +++ b/src/video/x11/SDL_x11window.c	Tue Sep 10 18:25:13 2013 -0700
     1.3 @@ -365,7 +365,8 @@
     1.4      Uint32 fevent = 0;
     1.5  
     1.6  #if SDL_VIDEO_OPENGL_GLX || SDL_VIDEO_OPENGL_EGL
     1.7 -    if (window->flags & SDL_WINDOW_OPENGL) {
     1.8 +    if ((window->flags & SDL_WINDOW_OPENGL) &&
     1.9 +        !SDL_getenv("SDL_VIDEO_X11_VISUALID")) {
    1.10          XVisualInfo *vinfo = NULL;
    1.11  
    1.12  #if SDL_VIDEO_OPENGL_EGL