i am using Jinput with no issues so far, i struggled but the events are now working, however i am trying to make some disconnecting / reconnecting, i have the code that must work, but if i start the app without the GamePad connected there is no possibility to make it work it only works when the gamepad is connected and then start the application ( in this case a game ), if while the game is running i disconnect the device i could stopped the POLLING event, however when i try to reconnect the device again there is no possibility to reconnect it to the game, the poll message “Failed to poll device” is always present, even if i am restarting and trying to find the connected devices again.
any idea with this?
when the device is disconnected i started again to find the connected devices with:
Controller[] controllers = ControllerEnvironment.getDefaultEnvironment().getControllers();
but this does not work once the device is disconnected while the app is running, i have to restart the app to make it work again