I'm trying to have several gamepad at the same time in JInput, while also checking for newly plugged gamepad. Here is the code used to check for new controllers.
new DirectAndRawInputEnvironmentPlugin().getControllers();
If I run this code several time and store the results, the same peripheric appear on a different "Controller" instance amongst the results. Which lead to a lot of problems.
How do I check if two instance of Controller are similar ? IE if they control the same peripheric ?
I guess it could work if I checked for the name/number of components/rumblers, etc to see if they are similar (like hashing the device). But what if I plug the same gamepad twice ?
Thanks !