diff options
author | endolf <[email protected]> | 2009-03-28 16:22:05 +0000 |
---|---|---|
committer | endolf <[email protected]> | 2009-03-28 16:22:05 +0000 |
commit | 2ec2fe4bbdcc9a82aed40f5327ef2a91e59571fe (patch) | |
tree | b707a61c93162ea384ad2a8974ac89307e1768d8 | |
parent | 1b27bc8726d78cde0941683d659c4253c7d94561 (diff) |
Check the arch type before loading the .so
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@220 e343933a-64c8-49c5-92b1-88f2ce3e89e8
-rw-r--r-- | plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java b/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java index b8e9ef6..1f11a3c 100644 --- a/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java +++ b/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java @@ -89,17 +89,16 @@ public final class LinuxEnvironmentPlugin extends ControllerEnvironment implemen String osName = getPrivilegedProperty("os.name", "").trim(); if(osName.equals("Linux")) { try { - loadLibrary(LIBNAME); - supported = true; - } catch (UnsatisfiedLinkError e) { - try { + if("i386".equals(getPrivilegedProperty("os.arch"))) { + loadLibrary(LIBNAME); + } else { loadLibrary(LIBNAME + POSTFIX64BIT); - supported = true; - } catch (UnsatisfiedLinkError e2) { - logln("Failed to load 64 bit library: " + e2.getMessage()); - e.printStackTrace(); - supported = false; } + supported = true; + } catch (UnsatisfiedLinkError e) { + logln("Failed to load 64 bit library: " + e.getMessage()); + e.printStackTrace(); + supported = false; } } } |