Check the arch type before loading the native library

This commit is contained in:
endolf 2009-03-28 16:36:03 +00:00
parent b789b8cd52
commit c95cf4bddd
3 changed files with 25 additions and 17 deletions

View file

@ -103,7 +103,11 @@ public final class DirectInputEnvironmentPlugin extends ControllerEnvironment im
String osName = getPrivilegedProperty("os.name", "").trim();
if(osName.startsWith("Windows")) {
supported = true;
loadLibrary("jinput-dx8");
if("x86".equals(getPrivilegedProperty("os.arch"))) {
loadLibrary("jinput-dx8");
} else {
loadLibrary("jinput-dx8-64");
}
}
}

View file

@ -103,7 +103,11 @@ public final class RawInputEnvironmentPlugin extends ControllerEnvironment imple
String osName = getPrivilegedProperty("os.name", "").trim();
if(osName.startsWith("Windows")) {
supported = true;
loadLibrary("jinput-raw");
if("x86".equals(getPrivilegedProperty("os.arch"))) {
loadLibrary("jinput-raw");
} else {
loadLibrary("jinput-raw-64");
}
}
}