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

input: Try to fix ingame pad connection updates #15697

Merged
merged 3 commits into from
Jun 12, 2024
Merged

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Jun 11, 2024

I noticed that the pad connection state in games doesn't respond to pad settings changes properly anymore.
For instance, after switching from a disconnected DS4 handler to a connected xbox handler I had to first disconnect and then connect the controller again before I could control the game again.

I think it's best to move the pad_state_notify_state_change to a dedicated spot in the pad thread.
This has several advantages:

  • The connection state notifications are now independent from the pad handlers and their settings
  • The code now has a single point of failure. We had 3 spots before and the conditions didn't even match.
  • Fixes an issue where the passed index was always based on the pad count in the individual handlers instead of the total pad count
  • We can remove the "emulation" parameter from the handlers

Please compare this with the current release to confirm that this improves things.

@Darkhost1999
Copy link
Contributor

This fixes those moments I use Moonlight to test a game and forget to switch pad settings to keyboard before booting a game.
I'm able to switch from xinput or sdl to keyboard and it works as intended without restarting the game. All normal face inputs and the overlays seem to work. Switching back from keyboard to xinput or SDL always worked for me and still works.
Thanks.

@Megamouse Megamouse merged commit b8452d2 into RPCS3:master Jun 12, 2024
4 of 6 checks passed
@Megamouse Megamouse deleted the input branch June 13, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants