RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    retroarch controllers input number file configuration mapping

    Scheduled Pinned Locked Moved Help and Support
    retroarchretropie setupcontrollers
    4 Posts 2 Posters 800 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.
    • W
      winterelf
      last edited by

      Hi,
      I am trying to change the retroarch port 1/2/3 controls using a script. Usually I manually access the retroarch configuration in order to switch between devices indexes so player 1 now become a controller which use to be player 2 (was mapped to port 2).

      is there some kind of a file which all this info exists? I want to write a script which changes this inputs when I need.

      Basically this is the configuration I am talking about:
      2.jpg

      1 Reply Last reply Reply Quote 0
      • S
        sleve_mcdichael
        last edited by

        I don't know if your goal is to write the script, or simply just have the script, but you might find some inspiration, if not a complete solution, in: https://github.com/meleu/RetroPie-joystick-selection

        W 1 Reply Last reply Reply Quote 0
        • W
          winterelf @sleve_mcdichael
          last edited by winterelf

          @sleve_mcdichael not sure this repo is still active. I used it a month ago, it had some errors during usage. I don't think it's active.

          1 Reply Last reply Reply Quote 0
          • W
            winterelf
            last edited by

            I have found the holy grail in this repo line:
            https://github.com/meleu/RetroPie-joystick-selection/blob/master/jsfuncs.sh#L345

            Basically in order to change the index, we should just edit /opt/retropie/configs/all/retroarch.cfg at this line:
            input_player1_joypad_index = "some_index_number"

            or whatever input player you want. NOTE: i didn't tested it yet, but this might work.

            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.