Applying 64bit loading patch by Matthias

This commit is contained in:
Brian Matzon 2011-06-19 20:18:02 +00:00
parent 96648a6fad
commit 18e6e1f95f

View file

@ -78,6 +78,19 @@ public final class Sys {
}
private static void loadLibrary(final String lib_name) {
// actively try to load 64bit libs on 64bit architectures first
String osArch = System.getProperty("os.arch");
boolean is64bit = "amd64".equals(osArch) || "x86_64".equals(osArch);
if(is64bit) {
try {
doLoadLibrary(lib_name + POSTFIX64BIT);
return;
} catch (UnsatisfiedLinkError e) {
LWJGLUtil.log("Failed to load 64 bit library: " + e.getMessage());
}
}
// fallback to loading the "old way"
try {
doLoadLibrary(lib_name);
} catch (UnsatisfiedLinkError e) {