From: Elias N. <eli...@us...> - 2002-12-14 13:37:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv20087/common Modified Files: extal.c extal.h org_lwjgl_openal_ALUT.cpp Log Message: Fixed oal dynamic loading on linux 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.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- extal.c 14 Dec 2002 12:49:16 -0000 1.3 +++ extal.c 14 Dec 2002 13:37:46 -0000 1.4 @@ -30,6 +30,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <stdio.h> #include "extal.h" /** @@ -111,11 +112,11 @@ alcGetProcAddressPROC alcGetProcAddress = NULL; alcGetEnumValuePROC alcGetEnumValue = NULL; +#ifdef _WIN32 EAXSet eaxSet; // EAXSet function, ret$ EAXGet eaxGet; // EAXGet function, ret$ /* Handle to OpenAL Library */ -#ifdef WIN32 HMODULE handleOAL; #else void* handleOAL; @@ -383,4 +384,4 @@ */ int LoadALExtensions() { return 1; -} \ No newline at end of file +} 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.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- extal.h 14 Dec 2002 12:49:16 -0000 1.9 +++ extal.h 14 Dec 2002 13:37:46 -0000 1.10 @@ -33,7 +33,9 @@ #ifndef _AL_TEST_H #define _AL_TEST_H +#ifdef _WIN32 #include <windows.h> +#endif #include <AL/altypes.h> #include <AL/alctypes.h> @@ -51,9 +53,6 @@ #define ALCAPI __declspec(dllimport) #endif - typedef struct ALCdevice_struct ALCdevice; - typedef struct ALCcontext_struct ALCcontext; - #define ALCAPIENTRY __cdecl #else #ifdef TARGET_OS_MAC @@ -62,7 +61,7 @@ #endif #endif #define ALCAPI - #define ALCAPIENTRY __cdecl + #define ALCAPIENTRY #endif #ifdef _WIN32 @@ -80,10 +79,11 @@ #endif #endif #define ALAPI - #define ALAPIENTRY __cdecl + #define ALAPIENTRY #define AL_CALLBACK #endif +#ifdef _WIN32 DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties, 0x306a6a8, 0xb224, @@ -95,15 +95,19 @@ 0xb224, 0x11d2, 0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22); +#endif #define INITGUID #define OPENAL + typedef struct ALCdevice_struct ALCdevice; + typedef struct ALCcontext_struct ALCcontext; + int InitializeOpenAL(); 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); @@ -252,14 +256,16 @@ extern alDopplerFactorPROC alDopplerFactor; extern alDopplerVelocityPROC alDopplerVelocity; +#ifdef _WIN32 typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); extern EAXSet eaxSet; extern EAXGet eaxGet; +#endif #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif Index: org_lwjgl_openal_ALUT.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_openal_ALUT.cpp 14 Dec 2002 12:54:25 -0000 1.5 +++ org_lwjgl_openal_ALUT.cpp 14 Dec 2002 13:37:46 -0000 1.6 @@ -42,7 +42,9 @@ #include "org_lwjgl_openal_ALUT.h" #include <stdlib.h> +#ifdef _WIN32 #include <windows.h> +#endif /* OpenAL includes */ #include "checkALerror.h" @@ -175,4 +177,4 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *env, jobject obj, jint format, jint data, jint size, jint freq) { alutUnloadWAV(format, (void**) data, size, freq); CHECK_AL_ERROR -} \ No newline at end of file +} |