From 6e6a6dbfd8068dd71bd94ef7f72e809277006f3c Mon Sep 17 00:00:00 2001 From: elias Date: Tue, 11 Jul 2006 21:02:46 +0000 Subject: Linux: Implemented support for libjinput-linux64.so 64 bit library git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@149 e343933a-64c8-49c5-92b1-88f2ce3e89e8 --- .../net/java/games/input/LinuxEnvironmentPlugin.java | 15 ++++++++++++++- plugins/linux/src/native/build.xml | 18 +++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) (limited to 'plugins/linux') 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 7ad3439..d4f7f31 100644 --- a/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java +++ b/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java @@ -39,12 +39,25 @@ import java.security.PrivilegedAction; * @author Jeremy Booth (jeremy@newdawnsoftware.com) */ public final class LinuxEnvironmentPlugin extends ControllerEnvironment implements Plugin { + private final static String LIBNAME = "jinput-linux"; + private final static String POSTFIX64BIT = "64"; + private final Controller[] controllers; private final List devices = new ArrayList(); private final static LinuxDeviceThread device_thread = new LinuxDeviceThread(); static { - DefaultControllerEnvironment.loadLibrary("jinput-linux"); + try { + DefaultControllerEnvironment.loadLibrary(LIBNAME); + } catch (UnsatisfiedLinkError e) { + try { + DefaultControllerEnvironment.loadLibrary(LIBNAME + POSTFIX64BIT); + } catch (UnsatisfiedLinkError e2) { + ControllerEnvironment.logln("Failed to load 64 bit library: " + e2.getMessage()); + // throw original error + throw e; + } + } } public final static Object execute(LinuxDeviceTask task) throws IOException { diff --git a/plugins/linux/src/native/build.xml b/plugins/linux/src/native/build.xml index c323163..c88a6ef 100644 --- a/plugins/linux/src/native/build.xml +++ b/plugins/linux/src/native/build.xml @@ -6,12 +6,10 @@ - + + - - - - + @@ -22,11 +20,17 @@ - + - + + + + + + + -- cgit v1.2.3