Hey all... i am trying to use the controllerListener thing to detect when a user unplugs the controller... is this implemented yet on the Windows os?
1 2 3 4 5 6 7 8 9 10 11
| ce.addControllerListener(new ControllerListener(){ public void controllerAdded(ControllerEvent ev) { manager.refreshControllers(); } public void controllerRemoved(ControllerEvent ev) { System.out.println("Controller Removed"); manager.refreshControllers(); } }); |
Alternately, cause whatever causes JInput to print
.Acquire : DIERR_UNPLUGGED
to throw an exception instead... then we can catch it and know somethings been unplugged...
-Judd