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
Fix phantom configured controllers #3720
Conversation
Enable guest controller only when a valid host controller is mapped.
Thinking about it more, this change is slightly wider reaching than I intended, although I think for the better. Now physically connecting/disconnecting controllers will immediately reconfigure the assigned player on the guest side. So, essentially a "P2 has joined" when the corresponding controller for P2 is connected and vice versa. I think this flow is closer to how it works natively. Only difference being right now the player index is fixed (in the input settings) but on hardware it is dynamically assigned with help from controller applet. A few users might be annoyed if their controller has connectivity issues (bad signal or flimsy USB connector), the game or controller applet will pester them to fix it. Before this PR, controller disconnects would be invisible to the game as the player is never removed. This would've resulted in lost inputs without any notice so I think it's better this way. Note: This fix only effects emulation side. Ryu's input configuration is persistent (for other good reasons). The GUI will still show once-configured-but-now-disconnected controllers as "disabled", just with this PR it won't effect the guest. Not sure if there's an issue already open for UI inconsistency. |
By "phantom configured controllers" here does this fix the bug where the controller applet will pop-up seemingly with no controllers configured, or is this fixing the GUI bug where multiple of the same controller can sometimes appear in the dropdown? I think it's the former? I've added the GUI tag for now just to be safe. |
I've not touched SDL2 controller detection or input configuration GUI so it's definitely not the latter. Also, I wasn't aware of multiple copies of a controller appearing. Is that not an SDL2 specific quirk? Not sure how to filter them out.
As a side-effect, yes. Without this change, it could pop-up when the stale host controllers would still be mapped to players that the game doesn't like. Then the usual support advice given was to delete the entire The title's "configured controllers" refers to log lines with the same name-
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. I think the original service has all controllers attached, but then the controller applet decides which are actually "bound" via manual selection with L+R.
ReloadConfiguration
andRefreshInputConfigForHLE
pass the unfiltered InputConfig down the chain even when the mapped host controller is invalid (missing, etc..). Bug probably introduced with #2194 and #2269.Admittedly I don't understand Miria much, so I've opted for a shallow fix. Let me know if there's a better way or I missed something.