Dynamic additions

Does jinput support dynamic editions of USB devices after initialization? I’ve tried calling:

    ControllerEnvironment ce = ControllerEnvironment.getDefaultEnvironment();
    Controller[] ca = ce.getControllers();

But I don’t see an increase in the number of controllers when I plug one in. Ideally it would be a listener I could request updates on newly added or removed devices. If its not in the library I can look at adding it. Its not a high priority for our project but it would be nice.

Hi
The framework is there, it’s just a case of the plugins supporting it, and currently, they don’t, there are notifications for device attachment and removal as far as I know :slight_smile:

Endolf

AFAIK DirectInput is not able to do this. On Linux things are a bit different. I just do not know how device additions and removals could be detected but that does not mean that it is not possible. Maybe we should contact the appropriate maintainer for this.

Any USB controllers should be hot-pluggable. But JInput plugins might not rescan the bus after they have initialized. If this isn’t working you should prbbaly file an issue in the java.net issue tracker for the JInput project.