From: Elias N. <eli...@us...> - 2002-12-14 13:44:57
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv21877/common Modified Files: extal.c extal.h Log Message: More oal linux fixes Index: extal.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- extal.c 14 Dec 2002 13:37:46 -0000 1.4 +++ extal.c 14 Dec 2002 13:44:55 -0000 1.5 @@ -33,6 +33,10 @@ #include <stdio.h> #include "extal.h" +#ifndef _WIN32 +#include <dlfcn.h> +#endif + /** * $Id$ * @@ -150,7 +154,7 @@ #ifdef _WIN32 return GetProcAddress(handleOAL, function); #else - return NULL; + return dlsym(handleOAL, function); #endif } @@ -161,7 +165,7 @@ #ifdef _WIN32 handleOAL = LoadLibrary("OpenAL32.dll"); #else - handleOAL = NULL; + handleOAL = dlopen("libopenal.so", RTLD_LAZY); #endif } Index: extal.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- extal.h 14 Dec 2002 13:37:46 -0000 1.10 +++ extal.h 14 Dec 2002 13:44:55 -0000 1.11 @@ -107,7 +107,7 @@ void DeInitializeOpenAL(); //alc -typedef ALCubyte* (/*ALCAPIENTRY*/ *alcGetStringPROC)(ALCdevice *device,ALCenum param); +typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param); typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data); typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName); typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device); |