I am currently making a game with the java library LibGDX and want to add XBox 360 controller support using the GDX-Controllers extension. At the moment I have a setup where I create a listener to listen for particular button presses, then attach that listener to the static Controllers
class using the method: Controllers.addListener(myListener)
This method works fine for listening for button press events from controllers which were connected at the time the program started but, if I try connecting a controller after the game has started, events for this controller are not registered.
I cannot see from the source code a way to update the listener for new controllers, and it appears from this blog post that disconnects and re-connects may not be supported on the desktop.
My question is: Is there a solution to my problem using GDX-controllers and, if not, what are my options for getting full Xbox 360 controller support (Including controller connects and disconnects) If I want functionality which integrates with the libGDX framework?
Controllers.getControllers().size
every frame but the number printed doesn't change, regardless of whether i connect more controllers or not, so clearly I am missing a step \$\endgroup\$