Skip to content

Commit

Permalink
X11 driver now chooses "libGL.so.1" as a default when a NULL is passe…
Browse files Browse the repository at this point in the history
…d to

 SDL_GL_LoadLibrary().
  • Loading branch information
icculus committed Nov 22, 2005
1 parent 5e504d5 commit a5e0fed
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/video/x11/SDL_x11gl.c
Expand Up @@ -418,16 +418,23 @@ void X11_GL_UnloadLibrary(_THIS)

#ifdef HAVE_OPENGL

/* If this is wrong, please put some #ifdefs for your platform! */
#define DEFAULT_GL_DRIVER_PATH "libGL.so.1"

/* Passing a NULL path means load pointers from the application */
int X11_GL_LoadLibrary(_THIS, const char* path)
{
void* handle;
int dlopen_flags;

if ( gl_active ) {
SDL_SetError("OpenGL context already created");
return -1;
}
if ( gl_active ) {
SDL_SetError("OpenGL context already created");
return -1;
}

if ( path == NULL ) {
path = DEFAULT_GL_DRIVER_PATH;
}

#ifdef RTLD_GLOBAL
dlopen_flags = RTLD_LAZY | RTLD_GLOBAL;
Expand Down

0 comments on commit a5e0fed

Please sign in to comment.