mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 23:44:06 +00:00
OpenCL bug fixes on MacOS.
Improved 64bit pointer detection.
This commit is contained in:
parent
3470552355
commit
f80e5a94d6
7 changed files with 45 additions and 28 deletions
|
|
@ -77,15 +77,13 @@ public final class Sys {
|
|||
});
|
||||
}
|
||||
|
||||
private static boolean loadLibrary(final String lib_name) {
|
||||
private static void loadLibrary(final String lib_name) {
|
||||
try {
|
||||
doLoadLibrary(lib_name);
|
||||
return false;
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
if (implementation.has64Bit()) {
|
||||
try {
|
||||
doLoadLibrary(lib_name + POSTFIX64BIT);
|
||||
return true;
|
||||
} catch (UnsatisfiedLinkError e2) {
|
||||
LWJGLUtil.log("Failed to load 64 bit library: " + e2.getMessage());
|
||||
}
|
||||
|
|
@ -97,13 +95,14 @@ public final class Sys {
|
|||
|
||||
static {
|
||||
implementation = createImplementation();
|
||||
is64Bit = loadLibrary(JNI_LIBRARY_NAME);
|
||||
loadLibrary(JNI_LIBRARY_NAME);
|
||||
is64Bit = implementation.getPointerSize() == 8;
|
||||
|
||||
int native_jni_version = implementation.getJNIVersion();
|
||||
int required_version = implementation.getRequiredJNIVersion();
|
||||
if (native_jni_version != required_version)
|
||||
throw new LinkageError("Version mismatch: jar version is '" + required_version +
|
||||
"', native libary version is '" + native_jni_version + "'");
|
||||
"', native library version is '" + native_jni_version + "'");
|
||||
implementation.setDebug(LWJGLUtil.DEBUG);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue