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" );
|
char *apppath = Cvar_VariableString( "fs_apppath" );
|
||||||
#endif
|
#endif
|
||||||
const char* binarypath = Sys_BinaryPath();
|
const char* binarypath = Sys_BinaryPath();
|
||||||
|
const char* current_dir = Sys_CurrentDirname();
|
||||||
|
|
||||||
const char *searchPaths[] = {
|
const char *searchPaths[] = {
|
||||||
homepath,
|
homepath,
|
||||||
|
@ -579,6 +580,7 @@ void *Sys_LoadSPGameDll( const char *name, GetGameAPIProc **GetGameAPI )
|
||||||
#endif
|
#endif
|
||||||
basepath,
|
basepath,
|
||||||
binarypath,
|
binarypath,
|
||||||
|
current_dir,
|
||||||
cdpath,
|
cdpath,
|
||||||
};
|
};
|
||||||
size_t numPaths = ARRAY_LEN( searchPaths );
|
size_t numPaths = ARRAY_LEN( searchPaths );
|
||||||
|
|
|
@ -99,11 +99,6 @@ const char *Sys_CurrentDirname( )
|
||||||
dir
|
dir
|
||||||
);
|
);
|
||||||
|
|
||||||
while( length > 0 && dir[ length ] != '\\' )
|
|
||||||
length--;
|
|
||||||
|
|
||||||
dir[ length ] = '\0';
|
|
||||||
|
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue