mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
User's OpenAL library has precedence over Apple's framework
https://forum.zdoom.org/viewtopic.php?t=59920
This commit is contained in:
parent
3072c9bf7c
commit
40bf8a421e
1 changed files with 11 additions and 3 deletions
|
@ -62,14 +62,22 @@ CVAR (String, snd_alresampler, "Default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
|
||||
#ifdef _WIN32
|
||||
#define OPENALLIB "openal32.dll"
|
||||
#elif defined(__APPLE__)
|
||||
#define OPENALLIB "OpenAL.framework/OpenAL"
|
||||
#elif defined(__OpenBSD__)
|
||||
#define OPENALLIB "libopenal.so"
|
||||
#else
|
||||
#define OPENALLIB "libopenal.so.1"
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
// User's library (like OpenAL Soft installed manually or via Homebrew) has precedence
|
||||
// over Apple's OpenAL framework which lacks several important features
|
||||
#define OPENALLIB1 "libopenal.1.dylib"
|
||||
#define OPENALLIB2 "OpenAL.framework/OpenAL"
|
||||
#else // !__APPLE__
|
||||
#define OPENALLIB1 NicePath("$PROGDIR/" OPENALLIB)
|
||||
#define OPENALLIB2 OPENALLIB
|
||||
#endif
|
||||
|
||||
bool IsOpenALPresent()
|
||||
{
|
||||
#ifdef NO_OPENAL
|
||||
|
@ -83,7 +91,7 @@ bool IsOpenALPresent()
|
|||
if (!done)
|
||||
{
|
||||
done = true;
|
||||
cached_result = OpenALModule.Load({NicePath("$PROGDIR/" OPENALLIB), OPENALLIB});
|
||||
cached_result = OpenALModule.Load({OPENALLIB1, OPENALLIB2});
|
||||
}
|
||||
return cached_result;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue