mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2025-01-19 15:40:59 +00:00
some libGL.so's need to be loaded with global symbols
This commit is contained in:
parent
31e9e7e883
commit
a610cd1cc8
1 changed files with 7 additions and 2 deletions
|
@ -3065,6 +3065,11 @@ void *qwglGetProcAddress(char *symbol)
|
||||||
|
|
||||||
qboolean QGL_Init( const char *dllname )
|
qboolean QGL_Init( const char *dllname )
|
||||||
{
|
{
|
||||||
|
int dlflags = RTLD_LAZY;
|
||||||
|
|
||||||
|
#ifdef RTLD_GLOBAL
|
||||||
|
dlflags |= RTLD_GLOBAL;
|
||||||
|
#endif
|
||||||
// update 3Dfx gamma irrespective of underlying DLL
|
// update 3Dfx gamma irrespective of underlying DLL
|
||||||
{
|
{
|
||||||
char envbuffer[1024];
|
char envbuffer[1024];
|
||||||
|
@ -3081,7 +3086,7 @@ qboolean QGL_Init( const char *dllname )
|
||||||
if (glw_state.OpenGLLib)
|
if (glw_state.OpenGLLib)
|
||||||
QGL_Shutdown();
|
QGL_Shutdown();
|
||||||
|
|
||||||
if ((glw_state.OpenGLLib = dlopen(dllname, RTLD_LAZY)) == 0) {
|
if ((glw_state.OpenGLLib = dlopen(dllname, dlflags)) == 0) {
|
||||||
char fn[MAX_OSPATH];
|
char fn[MAX_OSPATH];
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
|
@ -3093,7 +3098,7 @@ qboolean QGL_Init( const char *dllname )
|
||||||
|
|
||||||
snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname );
|
snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname );
|
||||||
|
|
||||||
if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) {
|
if ( ( glw_state.OpenGLLib = dlopen( fn, dlflags ) ) == 0 ) {
|
||||||
ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() );
|
ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue