Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMG assigns disconnected controller port to another active input device #329

Open
RetroRibbon opened this issue Feb 3, 2025 · 4 comments

Comments

@RetroRibbon
Copy link

Hello,

I am using the latest release of RMG.
I have assigned all four controller ports to correspond to one of my four wireless Xbox 360 pads, with the first port configured as 'Xbox 360 Wireless Controller (0)', the second port as 'Xbox 360 Wireless Controller (1)', and so on.
When a controller disconnects from the PC, the port the controller was connected to is assigned to another active port, which means that, for example, player 1 also controls player 2 and this is then saved when the game is exited...

Is it possible that RMG prevents this from happening or does not automatically assign another port when the controller disconnects?

@Rosalie241
Copy link
Owner

Rosalie241 commented Feb 3, 2025

It's sadly a rather difficult problem to solve, I've tried improving it a little in v0.7.2 by using the device's serial id that SDL provides me, in the same way rpsc3 does it, but I know that xbox series x controllers (and I presume xbox 360 controllers too) don't provide that, so I have to rely on the device path (which changes on every connect/disconnect) and device name in those cases, which causes the issue you've noticed.

I'm not sure if this can ever be properly fixed using SDL's existing APIs or if this is just a limitation other emulators struggle with aswell, so sadly I canot offer a solution right now but I'll keep this issue open so I can think about other solutions in the future.

EDIT: it seems like I've misread your issue, apologies, I've been tired, but I think that could be solved by seeing which controllers are already opened by other 'Players', I'll take a look when I'm able to.

@Zerodarkage
Copy link

Zerodarkage commented Feb 4, 2025

Hi! Just to add! (instead of opening another ticket!). "I'm using Faceoff Premiere Wired Pro Controller (Nintendo Switch from PDP)" Every time I want to play another game I need restart the emulator! Because when I close a game the controller changes the state to disconnected xD

@Rosalie241
Copy link
Owner

I've disabled hotplug support in v0.7.6 for now, so that should fix your issue hopefully.

@RetroRibbon
Copy link
Author

RetroRibbon commented Feb 23, 2025

It works partially.
Yes, a controller no longer controls another port when the controller in question is turned off.
If you want to reconnect the controller, you have to open the settings menu or you need to restart the emulation prozess which is probably due to the last update because hot plugging were deactivated.

If I open the input settings without reconnecting the controller, the controller port of the switched off controller is still stored with the controller that is still active, regardless of whether you then select "Cancel" or "OK", the active controller ends up controlling both players.(Without changing any settings or devices manually)

This error is only temporary, however, and will only be permanently overwritten if you select "OK".
After closing and restarting the emulator, the controller ports are separate again if you select "Cancel" in the input menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants