mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
Linux: added support for 64 bit JVMs
This commit is contained in:
parent
8efeea4d53
commit
e2bbb739aa
8 changed files with 49 additions and 14 deletions
|
|
@ -58,8 +58,10 @@ public final class Sys {
|
|||
|
||||
/** The implementation instance to delegate platform specific behavior to */
|
||||
private final static SysImplementation implementation;
|
||||
|
||||
private final static String POSTFIX64BIT = "64";
|
||||
|
||||
private static void loadLibrary(final String lib_name) {
|
||||
private static void doLoadLibrary(final String lib_name) {
|
||||
AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
String library_path = System.getProperty("org.lwjgl.librarypath");
|
||||
|
|
@ -72,6 +74,21 @@ public final class Sys {
|
|||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void loadLibrary(final String lib_name) {
|
||||
try {
|
||||
loadLibrary(lib_name);
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
if (implementation.has64Bit()) {
|
||||
try {
|
||||
loadLibrary(lib_name + POSTFIX64BIT);
|
||||
} catch (UnsatisfiedLinkError e2) {
|
||||
LWJGLUtil.log("Failed to load 64 bit library:" + e2.getMessage());
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue