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

    RetroPie-joystick-selection - One Controller As Both? Failover?

    Scheduled Pinned Locked Moved Help and Support
    controllersalternateadd-onscriptretroarch
    16 Posts 3 Posters 7.0k 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.
    • obsidianspiderO
      obsidianspider @edmaul69
      last edited by

      @edmaul69 OK, so I can get rid of the "both players" problem if I specifically set player 1 (preferred) and player 2 (regular) controllers. But, if I am in emulationstation, and unplug the "preferred" controller for player 1, the "regular" controller is now doing both players, because it's now the retroarch default, and I told the config program to use it for player 2.

      I understand that if a disconnected controller is there the system is going to use the retroarch default, but it's almost as if there needs to be a way to say "don't also use it for player 2 if you're defaulting to player 1"

      📷 @obsidianspider

      edmaul69E meleuM 2 Replies Last reply Reply Quote 1
      • edmaul69E
        edmaul69 @obsidianspider
        last edited by edmaul69

        @obsidianspider is your joystick recognized as two controllers? If not do it the old fashion way. Unset everything in joystick selection. Your usb port for the joystick should be in usb port 0 and the 4nes4snes should be in a different usb port. The controller in port 0 will take precedence over ports 1-3 and port 1 takes precedence over ports 2-3.....

        obsidianspiderO 1 Reply Last reply Reply Quote 0
        • obsidianspiderO
          obsidianspider @edmaul69
          last edited by

          @edmaul69 Yeah, it's doing input for both controllers if the controller that was set to player 1 is unplugged. I guess I'll have to mess around with it some more.

          📷 @obsidianspider

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

            @obsidianspider said in RetroPie-joystick-selection - One Controller As Both? Failover?:

            I understand that if a disconnected controller is there the system is going to use the retroarch default, but it's almost as if there needs to be a way to say "don't also use it for player 2 if you're defaulting to player 1"

            I got what you're saying. I'll try to take a look into this issue when I have enough time. ;-)

            • Useful topics
            • joystick-selection tool
            • rpie-art tool
            • achievements I made
            obsidianspiderO 1 Reply Last reply Reply Quote 1
            • obsidianspiderO
              obsidianspider @meleu
              last edited by

              @meleu thanks! I wasn't sure if I was making sense. Hopefully what I was asking is a reasonable thing for it to do.

              📷 @obsidianspider

              meleuM 2 Replies Last reply Reply Quote 0
              • meleuM
                meleu @obsidianspider
                last edited by

                @obsidianspider it's a fair request. I think I'll sacrifice some Pac'n'Pal sessions to sort it. :-)

                • Useful topics
                • joystick-selection tool
                • rpie-art tool
                • achievements I made
                1 Reply Last reply Reply Quote 1
                • meleuM
                  meleu @obsidianspider
                  last edited by

                  @obsidianspider I tried to sort it today but the solutions I found would bring an unwanted complexity to the joystick-selection scripts. I'm not sure if I want to go this way...

                  But I have a workaround that will solve your issue for a while. When you have the "one controller as both" issue, invoke RGUI and

                  Main Menu -> Settings -> Input -> Input User 2 Binds -> User 2 Device Index

                  With the cursor on User 2 Device Index press right until it says Disabled. If the Save Config on Exit is turned off (the default on RetroPie) this change won't persist between RetroArch sessions.

                  Is it enough for you?

                  • Useful topics
                  • joystick-selection tool
                  • rpie-art tool
                  • achievements I made
                  obsidianspiderO 1 Reply Last reply Reply Quote 1
                  • obsidianspiderO
                    obsidianspider @meleu
                    last edited by

                    @meleu Thank you so much for looking into it. That workaround does work for a temporary fix. Also, thank you for writing the controller selection utility.

                    📷 @obsidianspider

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

                      @obsidianspider
                      You're welcome.

                      Let me share some thoughts about the problems I faced when thinking on a solution for it. I think I'm being a little verbose here, but I know you are a curious guy that likes to know how stuff works. And maybe with a client feedback we can find a satisfactory solution. :)

                      Let's consider the following scenario for our analysis:

                      index = joystick
                      ----------------
                        0   =  joyA
                        1   =  joyB
                      

                      If the user wants to use the joyB for player1 and let the player2 unset, this is what happens:

                      player  =      index      = joystick
                      ------------------------------------
                      player1 =        1        = joyB
                      player2 = *defaults to 1* = joyB
                      

                      And this is what I think that is happening to you.

                      This is an unwanted behavior, but the solutions I'm thinking can bring another unwanted behavior.

                      Example: If the script automatically disables the player2 when this kind of conflict happens, this disabling will persist. And then when I change the player1 from joyB to another joystick, player2 won't recover its default joystick (joyB).

                      I could make this recovering happen using runcommand-onend.sh, but there's no guarantee that the onend script will execute 100% of the time (e.g.: unclean runcommand shutdown). And this results in the script changing configs with no user consent... This is the unwanted complexity/behavior I'm talking about.

                      I think I'll go with this solution:

                      • Add an option to disable player2-4 (disabling player1 is not a good idea).

                      • After finishing the joystick selection for a system (or the global), the script will alert the user about the possible conflicts.

                      • If the user don't want such conflict it needs to choose what to do itself. On our example the user could disable the player2. And this will be a conscious change.

                      What do you think about this approach?

                      • Useful topics
                      • joystick-selection tool
                      • rpie-art tool
                      • achievements I made
                      obsidianspiderO 1 Reply Last reply Reply Quote 1
                      • obsidianspiderO
                        obsidianspider @meleu
                        last edited by

                        @meleu Having it as something that the player is alerted to and gives them the option to accept is a great way to handle it. Thanks again for looking into this. I wasn't trying to give you more work!

                        📷 @obsidianspider

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

                          @obsidianspider after 4 months I've finnally took a look at it... :)
                          I've added an option to disable player2-4 (disabling player1 is not a good idea).
                          talked about it here.

                          Thanks for the feedback.

                          • Useful topics
                          • joystick-selection tool
                          • rpie-art tool
                          • achievements I made
                          obsidianspiderO 1 Reply Last reply Reply Quote 1
                          • obsidianspiderO
                            obsidianspider @meleu
                            last edited by

                            @meleu I'll have to give it a try some time! Thanks for looking into it.

                            📷 @obsidianspider

                            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.