RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Player Index Selector Script

    Scheduled Pinned Locked Moved Ideas and Development
    player indexruncommandswap players
    3 Posts 2 Posters 680 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hoover40
      last edited by

      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 file

      In 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?

      meleuM 1 Reply Last reply Reply Quote 0
      • H
        hoover40
        last edited by

        Is this way harder than I'm thinking it will be?

        1 Reply Last reply Reply Quote 0
        • meleuM
          meleu @hoover40
          last edited by meleu

          @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.

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          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.