From 6998e0bb66c2db62095b6c33f6665bfd992c7284 Mon Sep 17 00:00:00 2001 From: jeffpk Date: Thu, 26 Jun 2003 00:04:53 +0000 Subject: 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 --- .../src/java/net/java/games/input/DefaultControllerEnvironment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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