Added parameter libPath

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@519 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 00d39283cfa22d96f72edb363d021cb5c4bd0e79
Former-commit-id: f8a5f3705b6b7dd61c8795cc0e394f895b2a47b1
This commit is contained in:
wdbee 2008-12-20 09:42:41 +00:00
parent dfe5e483d7
commit e968f033ca

View file

@ -145,9 +145,9 @@ void GfModInfoFreeNC(tModInfoNC *array, int maxItf)
*/ */
int GfModInitialize(tSOHandle soHandle, const char *soPath, unsigned int gfid, tModList **mod) int GfModInitialize(tSOHandle soHandle, const char *soPath, unsigned int gfid, tModList **mod)
{ {
tfModInfoMaxItf fModInfoMaxItf; /* function that gives the max nb of itf of the module */ tfModInfoMaxItfSetName fModInfoMaxItf; /* function that gives the max nb of itf of the module and defines its name*/
tfModInfoInit fModInfoInit; /* init function of the module */ tfModInfoInit fModInfoInit; /* init function of the module */
int initSts = 0; /* returned status */ int initSts = 0; /* returned status */
int retained = 1; int retained = 1;
/* Allocate module entry in list */ /* Allocate module entry in list */
@ -159,10 +159,11 @@ int GfModInitialize(tSOHandle soHandle, const char *soPath, unsigned int gfid, t
/* Determine the number of interfaces of the module : /* Determine the number of interfaces of the module :
1) Call the dedicated module function if present */ 1) Call the dedicated module function if present */
if ((fModInfoMaxItf = (tfModInfoMaxItf)dlsym(soHandle, GfModInfoMaxItfFuncName)) != 0) if ((fModInfoMaxItf = (tfModInfoMaxItfSetName)dlsym(soHandle, GfModInfoMaxItfFuncName)) != 0)
{ {
/* DLL loaded, nbItf function exists, call it... */ /* DLL loaded, nbItf function exists, call it... */
(*mod)->modInfoSize = fModInfoMaxItf(); // Give DLL path to robot to define its name used by TORCS-NG
(*mod)->modInfoSize = fModInfoMaxItf(soPath);
} }
/* 2) If not present, default number of interfaces (backward compatibility) */ /* 2) If not present, default number of interfaces (backward compatibility) */