Skip to content
Permalink
Browse files

[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.
  • Loading branch information
pgriffais committed Sep 11, 2013
1 parent 5081b5d commit a9166450f49cec6c336c286c3e5b7a19108f0f3c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/video/x11/SDL_x11window.c
@@ -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

0 comments on commit a916645

Please sign in to comment.