aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java15
-rw-r--r--plugins/windows/src/java/net/java/games/input/RawInputEnvironmentPlugin.java15
2 files changed, 20 insertions, 10 deletions
diff --git a/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java b/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
index 5e31bad..4e5e742 100644
--- a/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
+++ b/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
@@ -67,11 +67,16 @@ public final class DirectInputEnvironmentPlugin extends ControllerEnvironment im
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;
}
});
diff --git a/plugins/windows/src/java/net/java/games/input/RawInputEnvironmentPlugin.java b/plugins/windows/src/java/net/java/games/input/RawInputEnvironmentPlugin.java
index 767d461..fe76215 100644
--- a/plugins/windows/src/java/net/java/games/input/RawInputEnvironmentPlugin.java
+++ b/plugins/windows/src/java/net/java/games/input/RawInputEnvironmentPlugin.java
@@ -67,11 +67,16 @@ public final class RawInputEnvironmentPlugin extends ControllerEnvironment imple
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;
}
});