Quote:
Originally Posted by Maxwell777
Weird. I tried that in LWJGL, but it didn't work. I assumed it wouldn't work in JInput, but looks like it does.
|
Perhaps LWJGL is using an old version of JInput.
Quote:
Originally Posted by Maxwell777
How would you check if the controller has reconnected? Would the .poll work again?
|
I'm not sure. Why don't you try it?
Quote:
Originally Posted by Maxwell777
What if you connected a new joystick? How would you rebuild the list attached gamepads, if, say, you started the program and then connected a controller?
|
The GitHub version of JInput allows you to
register listeners for controller state changes. That would probably be the most straight forward way.
I assume if JInput is able to fire events on controller state changes that it's also maintaining an updated list, but I haven't verified this.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor