[quake3-commits] r2114 - in trunk/code: client sys

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Aug 1 05:33:48 EDT 2011


Author: thilo
Date: 2011-08-01 05:33:48 -0400 (Mon, 01 Aug 2011)
New Revision: 2114

Modified:
   trunk/code/client/cl_curl.c
   trunk/code/client/cl_main.c
   trunk/code/client/qal.c
   trunk/code/sys/sys_loadlib.h
   trunk/code/sys/sys_main.c
Log:
Don't search system directories for renderer lib


Modified: trunk/code/client/cl_curl.c
===================================================================
--- trunk/code/client/cl_curl.c	2011-08-01 01:30:54 UTC (rev 2113)
+++ trunk/code/client/cl_curl.c	2011-08-01 09:33:48 UTC (rev 2114)
@@ -94,11 +94,11 @@
 
 
 	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;
 	}

Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2011-08-01 01:30:54 UTC (rev 2113)
+++ trunk/code/client/cl_main.c	2011-08-01 09:33:48 UTC (rev 2114)
@@ -3182,7 +3182,7 @@
 
 	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");
 

Modified: trunk/code/client/qal.c
===================================================================
--- trunk/code/client/qal.c	2011-08-01 01:30:54 UTC (rev 2113)
+++ trunk/code/client/qal.c	2011-08-01 09:33:48 UTC (rev 2114)
@@ -144,7 +144,7 @@
 	if(OpenALLib)
 		return qtrue;
 
-	if(!(OpenALLib = Sys_LoadDll(libname)))
+	if(!(OpenALLib = Sys_LoadDll(libname, qtrue)))
 		return qfalse;
 
 	alinit_fail = qfalse;

Modified: trunk/code/sys/sys_loadlib.h
===================================================================
--- trunk/code/sys/sys_loadlib.h	2011-08-01 01:30:54 UTC (rev 2113)
+++ trunk/code/sys/sys_loadlib.h	2011-08-01 09:33:48 UTC (rev 2114)
@@ -48,4 +48,4 @@
 #	define Sys_LibraryError() SDL_GetError()
 #endif
 
-void * QDECL Sys_LoadDll(const char *name);
+void * QDECL Sys_LoadDll(const char *name, qboolean useSystemLib);

Modified: trunk/code/sys/sys_main.c
===================================================================
--- trunk/code/sys/sys_main.c	2011-08-01 01:30:54 UTC (rev 2113)
+++ trunk/code/sys/sys_main.c	2011-08-01 09:33:48 UTC (rev 2114)
@@ -417,12 +417,14 @@
 =================
 */
 
-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];



More information about the quake3-commits mailing list