I'm trying to detect a Controller device with JInput. It works fine on my Win7 32 bit PC and Java 32 bit VM. But unfortunally it doesn't find the controller, when i start the programm on a Win7 64 bit PC with Java 64 Bit VM. My code is like this:
private boolean init() {
ControllerEnvironment env = new DirectAndRawInputEnvironmentPlugin();
Controller[] cs = env.getControllers();
for (int i = 0; i < cs.length; i++) {
if (cs[i].getName().contains("TM3 PTT")) {
pttController = cs[i];
}
}
if (pttController == null || !pttController.poll()) {
pttController = null;
return false;
}
return true;
}
Anyone has an idea, what i am doing wrong? Thank you.