[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.
This commit is contained in:
pgriffais 2013-09-10 18:25:13 -07:00
parent 5081b5d3da
commit a9166450f4
1 changed files with 2 additions and 1 deletions

View File

@ -365,7 +365,8 @@ X11_CreateWindow(_THIS, SDL_Window * window)
Uint32 fevent = 0;
#if SDL_VIDEO_OPENGL_GLX || SDL_VIDEO_OPENGL_EGL
if (window->flags & SDL_WINDOW_OPENGL) {
if ((window->flags & SDL_WINDOW_OPENGL) &&
!SDL_getenv("SDL_VIDEO_X11_VISUALID")) {
XVisualInfo *vinfo = NULL;
#if SDL_VIDEO_OPENGL_EGL