#91997
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.