mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-01-08 17:59:57 +01:00
Check the arch type before loading the .so
This commit is contained in:
parent
8a606b3e3f
commit
571769019e
|
|
@ -89,17 +89,16 @@ public final class LinuxEnvironmentPlugin extends ControllerEnvironment implemen
|
|||
String osName = getPrivilegedProperty("os.name", "").trim();
|
||||
if(osName.equals("Linux")) {
|
||||
try {
|
||||
loadLibrary(LIBNAME);
|
||||
if("i386".equals(getPrivilegedProperty("os.arch"))) {
|
||||
loadLibrary(LIBNAME);
|
||||
} else {
|
||||
loadLibrary(LIBNAME + POSTFIX64BIT);
|
||||
}
|
||||
supported = true;
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
try {
|
||||
loadLibrary(LIBNAME + POSTFIX64BIT);
|
||||
supported = true;
|
||||
} catch (UnsatisfiedLinkError e2) {
|
||||
logln("Failed to load 64 bit library: " + e2.getMessage());
|
||||
e.printStackTrace();
|
||||
supported = false;
|
||||
}
|
||||
logln("Failed to load 64 bit library: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
supported = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue