mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 22:45:50 +00:00
Mac OS X: Load the framework (builtin) version of OpenAL last, after having tried all possible locations of a private openal.dylib
This commit is contained in:
parent
a47ec6d86f
commit
19d2d219ec
3 changed files with 23 additions and 6 deletions
|
|
@ -66,6 +66,14 @@ public final class AL {
|
|||
* @param oalPaths Array of strings containing paths to search for OpenAL library
|
||||
*/
|
||||
private static native void nCreate(String oalPath) throws LWJGLException;
|
||||
|
||||
/**
|
||||
* Native method to create AL instance from the Mac OS X 10.4 OpenAL framework.
|
||||
* It is only defined in the Mac OS X native library.
|
||||
*
|
||||
* @param oalPaths Array of strings containing paths to search for OpenAL library
|
||||
*/
|
||||
private static native void nCreateDefault() throws LWJGLException;
|
||||
|
||||
/**
|
||||
* Native method the destroy the AL
|
||||
|
|
@ -108,6 +116,11 @@ public final class AL {
|
|||
LWJGLUtil.log("Failed to load " + oalPaths[i] + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
if (!created && LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX) {
|
||||
// Try to load OpenAL from the framework instead
|
||||
nCreateDefault();
|
||||
created = true;
|
||||
}
|
||||
if (!created)
|
||||
throw new LWJGLException("Could not locate OpenAL library.");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue