1
0
Fork 0
forked from fte/fteqw

Slight finetuning of Q2 game code loading.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2235 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2006-05-02 00:25:16 +00:00
parent 603f07b5a3
commit 771828d5fb

View file

@ -205,8 +205,17 @@ void *Sys_GetGameAPI(void *parms)
void (*q2_so_deinit)(void);
void *(*GetGameAPI)(void *);
void *ret;
char *searchpath;
char path[256];
gamefile = dlopen("gameppc.so", RTLD_NOW);
searchpath = 0;
while((searchpath = COM_NextPath(searchpath)))
{
snprintf(path, sizeof(path), "%s%sgameppc.so", searchpath[0]!='.'?searchpath:"", searchpath[0]&&searchpath[0]!='.'?"/":"");
gamefile = dlopen(path, RTLD_NOW);
if (gamefile)
{
q2_so_init = dlsym(gamefile, "q2_so_init");
@ -225,6 +234,7 @@ void *Sys_GetGameAPI(void *parms)
dlclose(gamefile);
gamefile = 0;
}
}
return 0;
}