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

    Keyboard always defaults to player 1

    Scheduled Pinned Locked Moved Help and Support
    28 Posts 6 Posters 20.2k 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.
    • kris964K
      kris964
      last edited by

      I also figured out a temporary solution for the time being.

      input_player1_joypad_index = 1
      input_player2_joypad_index = 0

      Only works for one player, but I'm the only using this anyway. But switching the index around, works like a charm. I have full control and all hotkeys working.

      1 Reply Last reply Reply Quote 0
      • RiverstormR
        Riverstorm @BuZz
        last edited by

        @BuZz said in Keyboard always defaults to player 1:

        @Riverstorm said in Keyboard always defaults to player 1:

        You might try deleting /opt/retropie/configs/all/emulationstation/es_input.cfg, power off your Pi, unplug everything except your PS controller, power it up and it should allow you to configure the controller as if it was an new install being first powered on.

        removing es_input.cfg will break auto-configuration - at least until emulationstation is reinstalled. So if removing it, it is important to reinstall emulationstation from retropie-setup menu 5

        Ok, Thanks Buzz, I wasn't aware of that. I always thought you could delete the file and auto-configuration would be available on the next boot. I will keep that in mind.

        1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators
          last edited by BuZz

          it will prompt you to configure ES again, but it wont call our script afterwards which configured retroarch.

          a default es_input.cfg looks like:

          <?xml version="1.0"?>
          <inputList>
            <inputAction type="onfinish">
              <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
            </inputAction>
          </inputList>
          

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          RiverstormR 1 Reply Last reply Reply Quote 0
          • RiverstormR
            Riverstorm @BuZz
            last edited by Riverstorm

            @BuZz said in Keyboard always defaults to player 1:

            it will prompt you to configure ES again, but it wont call our script afterwards which configured retroarch.

            a default es_input.cfg looks like:

            <?xml version="1.0"?>
            <inputList>
              <inputAction type="onfinish">
                <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
              </inputAction>
            </inputList>
            

            Ok, that makes sense now. Could you clarify something, when does this command trigger es_swap_a_b = 1 after an ES restart? Then as you add new controllers from that point on it will always automatically switch but with a restart of ES or is it on the fly with the input configuration?

            1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators
              last edited by BuZz

              if you have es_swap_a_b = 1 in place, it will be used when generating the new es_input.cfg after running /opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh - it will require a restart though, since es by default will use the input config entered, rather than the adjusted one generated. There is also a bug with page up / page down not working until a restart too - It's something I haven't had a chance to look at yet, but I need to make it reload the input configuration after controller config.

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

              RiverstormR 1 Reply Last reply Reply Quote 0
              • RiverstormR
                Riverstorm @BuZz
                last edited by

                @BuZz said in Keyboard always defaults to player 1:

                if you have es_swap_a_b = 1 in place, it will be used when generating the new es_input.cfg after running /opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh - it will require a restart though, since es by default will use the input config entered, rather than the adjusted one generated. There is also a bug with page up / page down not working until a restart too - It's something I haven't had a chance to look at yet, but I need to make it reload the input configuration after controller config.

                Ok, thanks Buzz, I appreciate the information. I was restarting the Pi then I was just restarting ES and I thought it does look like it's working properly that way.

                By the way I've been meaning to say for a while I do like the front page of the website. The extra information in the grid layout on ES, Retroarch, Libretro was really helpful for me in understanding how things all tied together. :)

                1 Reply Last reply Reply Quote 0
                • BuZzB
                  BuZz administrators
                  last edited by

                  Thanks! @herb_fargus and @Rookervik did that bit (and the screenshots on the slider).

                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                  1 Reply Last reply Reply Quote 0
                  • F
                    farlsmagee
                    last edited by

                    just fyi, I think I figured out how to set up the Bluetooth controller properly from the start so that it defaults to p1, granted I am using an nes30 pro so if there are firmware/hardware differences with the ps3 controller this may not work but its worth a try.

                    1. install a clean image
                    2. boot for the first time. plug the controller in with a wired connection to PORT 4 (bottom right USB)
                      ***DO NOT plug in a keyboard
                    3. emulationstation should detect one gamepad. go ahead and configure it first (yes it is still wired in)
                    4. next go to Bluetooth settings and register it
                      4.a while wired in, select the register option
                      4.b unplug the controllers wired connection from the controller side (not necessarily from the USB side)
                      4.c make the controller discoverable
                      4.d rpi should find the device
                      4.e plug the controller back in and complete the registration process (set udev rules, boot options, etc.)
                    5. quit and go back to emulationstation (controller still wired)
                    6. press start, navigate to configure input and select it - the screen should say that it is detecting TWO controllers
                    7. UNPLUG CONTROLLER. now press a button for emulationstation to recognize the controller in Bluetooth mode. configure it!
                    8. unplug the USB side and reboot the rpi
                    9. reboot your controller and you should be connected in Bluetooth to port0/P1.

                    at this point you should be able to connect a keyboard as well but USE PORT 4. I also don't bother with configuring it as an emulationstation controller... I ONLY use it to do the typing required in the back end or when searching for roms with the scraper.

                    the advantage of this method is that your controller shortcuts and all p1 functionality is retained EVEN IN THE MUPEN64 emulator! Using the joypad_index remapping method above works find for libretro cores but I found that playing hires n64 games I didn't have any shortcuts or even an exit for mupen64. With this method you should be good to go.

                    one other note: if you connect your controller to other devices like me (I travel, so I connect my nes30 pro to my laptop quite a bit) when you reconnect it to your pi, I've found that it is easiest to simply remove the device, then re-register it. you don't need to recreate the udev rule or set boot options... you just remove the device then add it back and you're good to go.

                    lastly, I've tested pretty successfully with adding other controllers as P2 and it works flawlessly once you get your p1 Bluetooth controller set up.

                    hope this helps!

                    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.