mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
fix issue loading game library running JK from another folder
This commit is contained in:
parent
572ae3f340
commit
2f024f77b0
2 changed files with 2 additions and 5 deletions
|
@ -571,6 +571,7 @@ void *Sys_LoadSPGameDll( const char *name, GetGameAPIProc **GetGameAPI )
|
|||
char *apppath = Cvar_VariableString( "fs_apppath" );
|
||||
#endif
|
||||
const char* binarypath = Sys_BinaryPath();
|
||||
const char* current_dir = Sys_CurrentDirname();
|
||||
|
||||
const char *searchPaths[] = {
|
||||
homepath,
|
||||
|
@ -579,6 +580,7 @@ void *Sys_LoadSPGameDll( const char *name, GetGameAPIProc **GetGameAPI )
|
|||
#endif
|
||||
basepath,
|
||||
binarypath,
|
||||
current_dir,
|
||||
cdpath,
|
||||
};
|
||||
size_t numPaths = ARRAY_LEN( searchPaths );
|
||||
|
|
|
@ -99,11 +99,6 @@ const char *Sys_CurrentDirname( )
|
|||
dir
|
||||
);
|
||||
|
||||
while( length > 0 && dir[ length ] != '\\' )
|
||||
length--;
|
||||
|
||||
dir[ length ] = '\0';
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue