Hi,
very tricky question. The solution is a proxy system that will bind a joystick to a particular player, this means tho special actions for your input source...
I worked on such a system for Incontrol ( the free version on github), but I removed it because it wasn't really ready for public use, and I need to update InControl support anyway ( since the paid version is now separated from the free version), so this could be a way to bring this back.
The solution currently is the following:
In the Input manager, you create all the axis you need per joystick, "Vertical 1", Vertical 2", Vertical 3", Vertical 4".
Once you have that ( it's a real pain, but necessary.. check incontrol input manager , it's already filled in, maybe you can use that as a base)
each player will be assigned a Joystick index, and they will request input by composing "Vertical_" with their joystick Id.
This solution will get you quite far, but has many potential flows. What if a joystick is unplugged for example, and so you'll have to cover these cases with a good and intuitive interface. Joystick assignment by the player himself will be tricky too without some heavy work on the interface to detect motion ( if you want auto assignment, etc etc).
If you are interested in the Incontrol version, I can bring that back, it has everything I said above, and basically, instead of querying for a joystick input, you query a player input, the binding of the player and joystick is done in the background by my system.
Bye,
Jean