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" );
#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 );

View file

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