2 Bluetooth (PS4) controllers, they keep SWITCHING

I’m running RA 1.3.4 on Mac OS X 10.10.

I’ve got 2 Bluetooth PS4 controllers, and everything works great, except every time I enter/leave a game, the 2 controllers have SWITCHED, and I have to ask my friend to switch controllers with me, it’s very weird.

Has anyone found a solution to this? Happy to share my config files, should I post them here?

Here’s my config, anybody see a reason for the constant switching? Could it be that the 2 identical PS4 controllers have the same name? https://dl.dropboxusercontent.com/u/112153/retroarch.cfg

Yeah, could be related. That should only be happening if the pads are losing connection and reconnecting each time, though…

Willing to put $200AUD Bounty to fix this issue!!

RetroArch 1.70 for Mac OSX, OS: Mac OSX High Sierra

Having exactly the same issue, 1 controller works perfect, the minute I connect a second controller Input 1 & Input 2 randomly switching when exiting & reopening Retroarch , tested it with the following combination of controllers; 2 x PS4 DS 2 x Nintendo Pro Controllers (for Nintendo Switch) 1 x Nintendo Pro Controller & 1 x PS4 DS

Willing to pay a decent bounty to force Retroarch to keep a specific controller connected via bluetooth in port #0, #1 etc (eg PS4 Dual Shock always to be Port #0 and Nintendo Pro Controller always port #1 or vice versa)

Cheers

I don’t think this is something we can fix, as we just enumerate the pads as the OS hands them to us. If the OS is going to hand them off in a random order each time, we have no way to know which one you want to be first or second or whatever.

Thanks for the reply hunterk, the controllers all have a name or can be renamed, cannot this be written into the retroarch.cfg file to hard config the specific controller assigned to User 1 & User 2 inputs etc?

RetroArch 1.19.1 on MacOS Sequoia 15.1

I am also having the same issue, but with a pair of USB Zero Delay encoders. I even went a step further and plugged said controllers into a USB hub/switch which allows me to toggle each encoder on/off individually, so I can confirm the order in which the devices are seen by RetroArch.

RetroArch will correctly see Player 1 as the first encoder toggled on, and Player 2 as the second. However, as soon as I launch a game, the player order is randomly assigned, persisting even in the menus after closing the game content.

This is especially troublesome for me as I have 2 additional buttons wired to Player 1 which allow me to pause and exit a game. Which now only work when Player 1 is randomly assigned as Player 1.

Has any progress been made on this issue? And/or is my issue different due to using hard wired USB devices?

Thanks!

I think a valid question might be, does this also occur on other emulators? Or which emulators don’t exhibit this type of behavior. After that it could just be a matter of finding out what is being done differently or better in other software that works as intended.

Which controller driver are you using? I’m using the mfi driver and I haven’t been able to reproduce this using the latest nightly build.

@warmenhoven I am using the hid driver. When I try to use the mfi driver, the buttons will bind correctly, but the inputs wont actually work correctly. For example: I will bind the ABXY inputs, and they will show in the menu as being bound correctly. But when I try to use them to navigate the menus after, they are sending the wrong commands. So instead of “accept” or “back” they “scroll” or do nothing / etc.

I don’t have any particular driver preference. So fixing either issue would work for me. I will try using the mfi driver on the nightly build later this evening and see if there is any difference.

Thank you for the suggestion. Ill let you know how it goes.

@Cyber There seems to be an issue with the latest MacOS and SDL2 (I am assuming). Because when I try to launch ES-DE, Xemu, DuckStation, or etc… with the encoders plugged in, they immediately crash. So I am not currently able to identify the behavior in the other emulators.

@warmenhoven I tried the nightly build, no difference. Players 1 & 2 still randomly swap when using the hid driver, and the buttons still do not map correctly when using the mfi driver.

For HID, with the nightly, in Settings > Input > RetroPad Binds > port, try using Device Reservation Type and Reserved Device for This Player to see if you can get the bindings to stick.

For mFI, is it only in the menu that the bindings do not apply properly?

So here are my findings based on your suggestions.

HID

  • Device reservation doesn’t seem to work correctly when both joysticks are enabled. If only one is enabled, I am able assign the settings. However, if both are enabled, the setting for player reservation will not assign. The UI seems to hang for a moment, then display incorrectly (floating text over text), then shows as unassigned.
  • Encoders still swap in most games, with player two becoming player one most of the time.

MFI

  • Button assignment still seems totally random in both the menus and games. But they are consistent in their ‘random’ assignment, like the bindings just never take effect.

SDL2

  • This more or less confirms my theory that MacOS Sequoia has a joystick / SDL2 bug. As soon as this driver is enabled, RetroArch crashes like all my other emulators.

The two joystick controllers are the same make, model, etc. I don’t know how RetroArch tracks which is which as they both just display as Generic USB Joystick (#N) with N being 1 or 2 depending on which devices was enabled first.

Now here is the real kicker… I noticed that more often than not, the joystick that is intended to be player two, ends up registering as player one in most games. So I figured that maybe there is a SN on the controller that either RetroArch or MacOS was using to set a priority. So I went through the time consuming process of ripping apart my control deck, and swapping the encoders around. And even after that the controllers still swap when launching a game, with the new encoder two still wanting to take over as player one.

The only difference between my player one setup and my player two setup is that player one wires in 2 additional buttons. But I can’t for the life of me think of any reason that would matter to the order in which the encoders are assigned.

The only way I have been able to consistently get encoder one to assign to player one is to launch RetroArch with only player one’s encoder enabled. Then launch a game. Then enable encoder two for player two.

A new oddity that I discovered today, but I’m not sure if it is related. N64 games do not respond to the up/left diagonal input when the joystick is bound to the N64’s analog stick. But all diagonals work fine when bound to the N64’s d-pad. I haven’t seen this issue in any other core thus far.

For anyone coming across this issue in the future. There does not seem to be a solution for this issue at this time. As such, I am just going to rip out the 2 joystick/pad encoders and install a single keyboard encoder instead. I would suggest you do the same.

Never mind… Looks like MacOS only supports ~6 key rollover. Which doesn’t work very well when 2 people are trying to play with a single keyboard encoder. Back to looking for a solution to the swapping joystick/pad issue.