fix issue loading game library running JK from another folder

This commit is contained in:
Simon 2023-08-12 23:23:04 +01:00
parent 572ae3f340
commit 2f024f77b0
2 changed files with 2 additions and 5 deletions

View file

@ -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 );

View file

@ -99,11 +99,6 @@ const char *Sys_CurrentDirname( )
dir dir
); );
while( length > 0 && dir[ length ] != '\\' )
length--;
dir[ length ] = '\0';
return dir; return dir;
} }