Skip to content

Commit

Permalink
[SDL] X11+GL: Allow Visual override for GL windows.
Browse files Browse the repository at this point in the history
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 a916645
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/x11/SDL_x11window.c
Expand Up @@ -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
Expand Down

0 comments on commit a916645

Please sign in to comment.