summaryrefslogtreecommitdiff
path: root/src/sys/sys_main.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-12 23:02:51 +0200
committer/dev/humancontroller <devhc@example.com>2017-02-07 17:34:59 +0100
commit4ba1f6db099cdc734ed4d58cbb2395cd65efb726 (patch)
tree6197576fc4abedcfc4158d1dbbf284e36b827103 /src/sys/sys_main.c
parenta7f237e668b010630a7f293c53c13dddbee1c5a5 (diff)
load libraries only, and load VMs additionally, from the path specified by the fs_overpath cvar
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;