reasonable to expect that the user will not plug in new controllers in game?

The usual samples show a code fragment like this:

    Controller[] controllers = driver.getKnownControllers();
    while(true) {
        for (Controller ctl : controllers) {
            ctl.poll();
            EventQueue queue = ctl.getEventQueue();
           // do stuff
        }
    }

Which works great in my testing.
But by placing the getKnownControllers() outside of the infinite loop, you will not detect any changes. The user could plug in a new controller, or even swap one for another, and the sample code will not detect it.

Is this a reasonable restriction? Is it acceptable to use this design? or should the main loop also check occasionally for new controllers?

If you want to make the extra effort for your players, please do!

It has been a while, but I don’t think JInput will detect controllers that have been plugged in since the app was started.

Currently it’s not a supported feature, people state that it’s important to them, but as with a lot of open source projects, none of them consider it important enough to spend the time to implement it.

It’s not important enough to me for me to do it right now either.

One person has done it in the past, but it was an internal development for a company that was not willing to release it back to the community.

Endolf

I have a hard time seeing that its a real-world need. I expect most folks plug in their controllers and then start the game.