Player Index Selector Script
-
My current setup has an x-arcade dual joystick and two controllers plugged into my pi. Sometimes I want to use the controllers and sometimes I want to us the x-arcade dual joystick. I want it to be easy and intuitive to switch the player index for the controllers. I think the easiest way to do this would be in the runcommand-onstart.sh script. I'd like to try to write it myself, but I'm not too sure where to start. This is what I think the simplest version of the script would need to do:
print "press a button on player 1 control"
listen for next input on all usb ports
save needed info from response
print "press a button on player 2 control"
listen for next input on all usb ports
save needed info from response
write info to appropriate config fileIn the googling I've done I think I can figure out how to do most of these steps, but I'm lost as to how I should do the listen for input on all usb ports step. Can anyone point me in the right direction?
-
Is this way harder than I'm thinking it will be?
-
@hoover40 have you tried the RetroPie-joystick-selection tool?
It has not the exactly same flow as you described, but you can achieve what you want.
Link on my signature.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.