addControllerListener not workng?

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?


            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

Hi
At the moment it isn’t supported, but it could be added like you propose, however, it’s not high on the priority list, if you raise an enhancment request over at jinput.dev.java.net it will get added to the list.

Cheers

Endolf