summaryrefslogtreecommitdiff
path: root/src/sys/sys_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/sys_main.c')
-rw-r--r--src/sys/sys_main.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c
index e5d93546..45b2f6ba 100644
--- a/src/sys/sys_main.c
+++ b/src/sys/sys_main.c
@@ -459,34 +459,20 @@ void *Sys_LoadDll(const char *name, qboolean useSystemLib)
if(!useSystemLib || !(dllhandle = Sys_LoadLibrary(name)))
{
- const char *topDir;
- char libPath[MAX_OSPATH];
+ const char *overpath = Cvar_VariableString("fs_overpath");
- topDir = Sys_BinaryPath();
-
- if(!*topDir)
- topDir = ".";
-
- Com_Printf("Trying to load \"%s\" from \"%s\"...\n", name, topDir);
- Com_sprintf(libPath, sizeof(libPath), "%s%c%s", topDir, PATH_SEP, name);
-
- if(!(dllhandle = Sys_LoadLibrary(libPath)))
+ if(overpath[0])
{
- const char *basePath = Cvar_VariableString("fs_basepath");
-
- if(!basePath || !*basePath)
- basePath = ".";
-
- if(FS_FilenameCompare(topDir, basePath))
- {
- Com_Printf("Trying to load \"%s\" from \"%s\"...\n", name, basePath);
- Com_sprintf(libPath, sizeof(libPath), "%s%c%s", basePath, PATH_SEP, name);
- dllhandle = Sys_LoadLibrary(libPath);
- }
-
- if(!dllhandle)
- Com_Printf("Loading \"%s\" failed\n", name);
+ char libPath[MAX_OSPATH];
+ Com_Printf("Trying to load \"%s\" from \"%s\"...\n", name, overpath);
+ Com_sprintf(libPath, sizeof(libPath), "%s%c%s", overpath, PATH_SEP, name);
+ dllhandle = Sys_LoadLibrary(libPath);
}
+ else
+ dllhandle = NULL;
+
+ if(!dllhandle)
+ Com_Printf("Loading \"%s\" failed\n", name);
}
return dllhandle;