Opened 3 months ago
Gracefully handle multiple controllers
|Reported by:||rodgerdavidson||Owned by:|
Currently, the default appears to use whichever controller is in first position to control the virtual mouse and other functions. But this is not always viable or preferred. The example I ran into was with the Retropie/Raspberry pi version of ScummVM on a GPI CASE 2 from Retroflag.
This case is designed to look like an old-school GameBoy system with a built-in control pad. It also can dock, like a Nintendo Switch, for big screen gaming using a Bluetooth or USB controller. In this case, the second controller would be preferred. But it was not natively functional. I had to hack a script together to make it work. More details here: https://retropie.org.uk/forum/topic/33334/scummvm-controller-help-needed
ScummVM seems to already support mapping all different buttons across multiple controllers. So, adding a way to hotswap the active may be all that is needed. A more elegant solution may be to allow the user to define a preference order, and select the first found/connected in that order. Obviously, this would require some work to be extended to game-by-game preference, if you wanted to take it that far. But an array of names in the scummvm.ini could be used to store the preference.