From e968f033ca72d4bf2c0de2867a6ac8d37e05d829 Mon Sep 17 00:00:00 2001 From: wdbee Date: Sat, 20 Dec 2008 09:42:41 +0000 Subject: [PATCH] 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 --- src/libs/tgf/modinfo.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libs/tgf/modinfo.cpp b/src/libs/tgf/modinfo.cpp index 4e0fb7c07..96daa8bf4 100644 --- a/src/libs/tgf/modinfo.cpp +++ b/src/libs/tgf/modinfo.cpp @@ -145,9 +145,9 @@ void GfModInfoFreeNC(tModInfoNC *array, int maxItf) */ 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 */ - tfModInfoInit fModInfoInit; /* init function of the module */ - int initSts = 0; /* returned status */ + tfModInfoMaxItfSetName fModInfoMaxItf; /* function that gives the max nb of itf of the module and defines its name*/ + tfModInfoInit fModInfoInit; /* init function of the module */ + int initSts = 0; /* returned status */ int retained = 1; /* 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 : 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... */ - (*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) */