diff options
author | endolf <[email protected]> | 2007-09-23 02:09:55 +0000 |
---|---|---|
committer | endolf <[email protected]> | 2007-09-23 02:09:55 +0000 |
commit | 922670baa3299cd8b030216f50c31eae0ffb4b50 (patch) | |
tree | fda317d7b1943a67e44999006cbc42565180d549 /plugins | |
parent | f6a6be5b1c9ea7beadecb89eb9dc017f8ca736b9 (diff) |
Rather than crashing, just disable the plugin if we an't load the dll
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@208 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java b/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java index 76e613d..a770ff9 100644 --- a/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java +++ b/plugins/wintab/src/java/net/java/games/input/WinTabEnvironmentPlugin.java @@ -47,11 +47,16 @@ public class WinTabEnvironmentPlugin extends ControllerEnvironment implements Pl AccessController.doPrivileged( new PrivilegedAction() { public final Object run() { - String lib_path = System.getProperty("net.java.games.input.librarypath"); - if (lib_path != null) - System.load(lib_path + File.separator + System.mapLibraryName(lib_name)); - else - System.loadLibrary(lib_name); + try { + String lib_path = System.getProperty("net.java.games.input.librarypath"); + if (lib_path != null) + System.load(lib_path + File.separator + System.mapLibraryName(lib_name)); + else + System.loadLibrary(lib_name); + } catch (UnsatisfiedLinkError e) { + e.printStackTrace(); + supported = false; + } return null; } }); |