aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeffpk <[email protected]>2003-06-26 00:04:53 +0000
committerjeffpk <[email protected]>2003-06-26 00:04:53 +0000
commit6998e0bb66c2db62095b6c33f6665bfd992c7284 (patch)
tree6aed8d6203fbfd7b301fdc6fdaa765845917349a
parent5c940777f8a6a92b0d66f4ef9f0b1c7da34306f0 (diff)
Slightly modified to talk to modified Plugin API in Jutils.
(Will now fail gracefully and silently if there is no controller directory available to search for plugins.) git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@9 e343933a-64c8-49c5-92b1-88f2ce3e89e8
-rw-r--r--coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java b/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java
index e72aeae..d3db0e4 100644
--- a/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java
+++ b/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java
@@ -166,8 +166,12 @@ class DefaultControllerEnvironment extends ControllerEnvironment {
}
private void scanControllersAt(String path) {
+ File file = new File(path);
+ if (!file.exists()) {
+ return;
+ }
try {
- Plugins plugins = new Plugins(new File(path));
+ Plugins plugins = new Plugins(file);
Class[] envClasses = plugins.getExtends(ControllerEnvironment.class);
for(int i=0;i<envClasses.length;i++){
try {