summaryrefslogtreecommitdiffstats
path: root/coreAPI
diff options
context:
space:
mode:
authorendolf <[email protected]>2003-09-04 11:50:06 +0000
committerendolf <[email protected]>2003-09-04 11:50:06 +0000
commitc97de0158caccce8cb22aaaeff9713b8fd80be2e (patch)
treeeca69c86e078301709d0e4e3d962d1d8d7464729 /coreAPI
parent41c671284eca63e26bfc0f3df720e551f5bf553a (diff)
Added property java.controllerPluginPath that enables users to specify
their own path for the controller plugin. git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@46 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'coreAPI')
-rw-r--r--coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java b/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java
index d3db0e4..75009de 100644
--- a/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java
+++ b/coreAPI/src/java/net/java/games/input/DefaultControllerEnvironment.java
@@ -159,10 +159,18 @@ class DefaultControllerEnvironment extends ControllerEnvironment {
/* This is jeff's new plugin code using Jeff's Plugin manager */
private void scanControllers() {
+ String pluginPathName = System.getProperty("jinput.controllerPluginPath");
+ if(pluginPathName == null) {
+ System.out.println("Using default controller plugin path");
+ pluginPathName = "controller";
+ } else {
+ System.out.println("Using specified controller plugin path (" + pluginPathName + ")");
+ }
+
scanControllersAt(System.getProperty("java.home") +
- File.separator + "lib"+File.separator+"controller");
+ File.separator + "lib"+File.separator + pluginPathName);
scanControllersAt(System.getProperty("user.dir")+
- File.separator+ "controller");
+ File.separator + pluginPathName);
}
private void scanControllersAt(String path) {