From 102757c802e350af7e8ef95363a56496ebd253cf Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 14 Dec 2002 13:44:55 +0000 Subject: [PATCH] More oal linux fixes --- src/native/common/extal.c | 8 ++++++-- src/native/common/extal.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/native/common/extal.c b/src/native/common/extal.c index 0c310458..f44159bc 100644 --- a/src/native/common/extal.c +++ b/src/native/common/extal.c @@ -33,6 +33,10 @@ #include #include "extal.h" +#ifndef _WIN32 +#include +#endif + /** * $Id$ * @@ -150,7 +154,7 @@ void* GetFunctionPointer(const char* function) { #ifdef _WIN32 return GetProcAddress(handleOAL, function); #else - return NULL; + return dlsym(handleOAL, function); #endif } @@ -161,7 +165,7 @@ void LoadOpenAL() { #ifdef _WIN32 handleOAL = LoadLibrary("OpenAL32.dll"); #else - handleOAL = NULL; + handleOAL = dlopen("libopenal.so", RTLD_LAZY); #endif } diff --git a/src/native/common/extal.h b/src/native/common/extal.h index 5001d925..4a267f85 100644 --- a/src/native/common/extal.h +++ b/src/native/common/extal.h @@ -107,7 +107,7 @@ 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);