Issue: Controller indexes are getting flipped

Welcome Page Forums RetroPie Project Everything else related to the RetroPie Project Issue: Controller indexes are getting flipped

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of cafarellidigital cafarellidigital 2 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #90600
    Profile photo of cafarellidigital
    cafarellidigital
    Participant

    I currently have 2.5.0 running on my Raspberry Pi 2. Almost everything is working well, except for the controllers. I’m using 2 PS3 (Dual Shock 3) controllers connected via bluetooth.

    The issue is that when I run any emulator (besides MAME) Controller 1 is Player 2, and Controller 2 is Player 1. I can go into the retroarch menu while in-game and switch the controllers, which will work until I exit out of the game and back to Emulation Station. Once I return to any game, the controllers will be switched again. MAME does not have this issue, it recognizes Controller 1 as Player 1, etc.

    If I only have 1 controller connected, it is recognized as Player 1. If I enter a game, and then connect Controller 2, it will be correctly recognized as Player 2. As soon as I exit out of the game, and go back, however, the indexes switch again.

    Before 2.5.0, I had 2.3.0 running with these same controllers with no issues. I’m not sure if something changed between the update, if I’m missing something simple, or if I just have a really weird bug. I’ve checked all of the retroarch.cfg files, and everything seems fine and correct.

    Anyone have any ideas? Thanks in advance!

    #91079
    Profile photo of davejaca
    davejaca
    Participant

    When you go into the retroarch menu and change the settings you need to go back to the main menu and save your settings to a new file. You then need to take this file and move/rename it to the correct location/filename. Every emulator is different and you can see what file each emulator uses for their append config file in es_systems.cfg.

    You can see this process being done here for the psx emulator: https://www.youtube.com/watch?v=r6-VOCyDoTc&t=432

    Let me know how you go

    #91997
    Profile photo of cafarellidigital
    cafarellidigital
    Participant

    davejaca, thanks for responding! That kind of works, but with a problem.

    So, say I start a game, and then open the RetroArch menu, go to the input section and switch the controllers; then I save that config, and overwrite the retroarch.cfg file (as per the instructions in the video you linked). That is the same as taking the current retroarch.cfg file, and editing it directly (I’ve tried it both ways, and can confirm).

    In both instances, what is happening is this…

    input_player1_joypad_index = 0
    input_player2_joypad_index = 1

    … is turning into this:

    input_player1_joypad_index = 1
    input_player2_joypad_index = 0

    Basically, Player 1 and 2 are switched. This works for every game and every system. I can turn the Raspberry Pi off and on, and it will work.

    However, there is still a problem. The above only works if I connect both controllers to the system before starting a game. If I only connect 1 controller (say I want to play a single player game by myself), then that controller will be seen as Player 2, because it says so in the config file. I won’t be able to control anything, since that controller is Player 2, and there is no Player 1 connected. At this point, if I then connect the 2nd controller, it will be forced to become Player 1. Then if I exit the game and emulator, and then enter a game again, the Players will be switched again (correctly, kind of). This is a bit too whacky of a side-effect for me to call it a solution.

    Essentially, my problem is this (as stated from my first post):
    Connect one controller, that controller is seen as Player 1.
    Connect two controllers, Controller 1 is Player 2, Controller 2 is Player 1.

    If I do a jstest on the controllers, Controller 1 correctly identifies as js0, and Controller 2 correctly identifies as js1. So the issue is not occurring in the operating system, as it sees the controllers as their correct input indexes, but in retroarch somewhere.

    Thanks for your suggestion, but it’s only a band-aid. In order for it to work, I’ll have to connect both controllers every time I use the system, even if it’s just 1 person playing.

    Update: Also, interestingly, the Controller indexes switch for Mupen64Plus, which is not governed by RetroArch settings. This must mean that the issue is not directly related to RetroArch. MAME, however, does not have this issue, and the Controller indexes work just fine.

Viewing 3 posts - 1 through 3 (of 3 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar