summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-08-01 09:33:48 +0000
committerTim Angus <tim@ngus.net>2013-01-10 23:11:06 +0000
commitc039c00ca0fe051f8ed243c08d238e739027cb76 (patch)
treed69a37fa483309ffe3bb3adfd81caef90eb4189c
parent9947b9b323b4b453dbb13dc808776c32de640a6b (diff)
Don't search system directories for renderer lib
-rw-r--r--src/client/cl_curl.c4
-rw-r--r--src/client/cl_main.c2
-rw-r--r--src/client/qal.c2
-rw-r--r--src/sys/sys_loadlib.h2
-rw-r--r--src/sys/sys_main.c8
5 files changed, 10 insertions, 8 deletions
diff --git a/src/client/cl_curl.c b/src/client/cl_curl.c
index e89d0dee..fd7f6901 100644
--- a/src/client/cl_curl.c
+++ b/src/client/cl_curl.c
@@ -95,11 +95,11 @@ qboolean CL_cURL_Init()
Com_Printf("Loading \"%s\"...", cl_cURLLib->string);
- if(!(cURLLib = Sys_LoadDll(cl_cURLLib->string)))
+ if(!(cURLLib = Sys_LoadDll(cl_cURLLib->string, qtrue)))
{
#ifdef ALTERNATE_CURL_LIB
// On some linux distributions there is no libcurl.so.3, but only libcurl.so.4. That one works too.
- if(!(cURLLib = Sys_LoadDll(ALTERNATE_CURL_LIB)))
+ if(!(cURLLib = Sys_LoadDll(ALTERNATE_CURL_LIB, qtrue)))
#endif
return qfalse;
}
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index 3ffa0007..16f594ee 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -3257,7 +3257,7 @@ void CL_InitRef( void ) {
Com_sprintf(dllName, sizeof(dllName), "renderer_%s_" ARCH_STRING DLL_EXT, cl_renderer->string);
- if(!(rendererLib = Sys_LoadDll(dllName)) && strcmp(cl_renderer->string, cl_renderer->resetString))
+ if(!(rendererLib = Sys_LoadDll(dllName, qfalse)) && strcmp(cl_renderer->string, cl_renderer->resetString))
{
Cvar_ForceReset("cl_renderer");
diff --git a/src/client/qal.c b/src/client/qal.c
index 68f19b72..2277b8a2 100644
--- a/src/client/qal.c
+++ b/src/client/qal.c
@@ -145,7 +145,7 @@ qboolean QAL_Init(const char *libname)
if(OpenALLib)
return qtrue;
- if(!(OpenALLib = Sys_LoadDll(libname)))
+ if(!(OpenALLib = Sys_LoadDll(libname, qtrue)))
return qfalse;
alinit_fail = qfalse;
diff --git a/src/sys/sys_loadlib.h b/src/sys/sys_loadlib.h
index 513b7d6c..0887f575 100644
--- a/src/sys/sys_loadlib.h
+++ b/src/sys/sys_loadlib.h
@@ -49,4 +49,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# define Sys_LibraryError() SDL_GetError()
#endif
-void * QDECL Sys_LoadDll(const char *name);
+void * QDECL Sys_LoadDll(const char *name, qboolean useSystemLib);
diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c
index 1ee40897..b46e0d20 100644
--- a/src/sys/sys_main.c
+++ b/src/sys/sys_main.c
@@ -418,12 +418,14 @@ from executable path, then fs_basepath.
=================
*/
-void *Sys_LoadDll(const char *name)
+void *Sys_LoadDll(const char *name, qboolean useSystemLib)
{
void *dllhandle;
- Com_Printf("Try loading \"%s\"...\n", name);
- if(!(dllhandle = Sys_LoadLibrary(name)))
+ if(useSystemLib)
+ Com_Printf("Try loading \"%s\"...\n", name);
+
+ if(!useSystemLib || !(dllhandle = Sys_LoadLibrary(name)))
{
const char *topDir;
char libPath[MAX_OSPATH];