Skip to content

Conversation

Brockengespenst
Copy link
Contributor

GameControllerManager shared one button/stick state between all connected game controllers. This led to one controller interfering with other controllers in multiplayer mode.

@Brockengespenst
Copy link
Contributor Author

Brockengespenst commented Sep 5, 2025

Having two controllers connected and playing local multiplayer was really horrible as one player blocked the other very often. With these changes, this effect does not occur anymore. This removes the attempt to get axis and d-pad somehow kind of synchronized, but I do not really see making these changes it any worse, because it would be anyway hard to find an appropriate solution. If the button/stick state should be kept as it was, it should be added as a per controller state and not a global one.

@MatusGuy : This reverts also the changes made in 68f4717. I was not sure about the original problem, maybe you can check if these changes either reintroduce the problem you had or maybe even fix it as well.

Copy link
Member

@tobbi tobbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test it as I don't have multiple game controllers. But code-wise everything is fine.

Copy link
Contributor

@MatusGuy MatusGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to have indeed reverted my changes. I'll see what I can do

@MatusGuy
Copy link
Contributor

Apply this patch and see if I haven't removed any functionality:

gamecontrollerfix.patch

@Brockengespenst
Copy link
Contributor Author

I tested your patch. At a first glance it looked quite normal, but then I ran into a state that the second controller's stick was not able to move Tux to the right. With the D-Pad it was working, but with the stick it was not possible to move to the right (only to the left). This happend two times during a 2 minute test. I have not checked into detail what went wrong in this case and what steps exactly are needed to reproduce it.

@mrkubax10 mrkubax10 added involves:functionality status:needs-discussion Team member and developers need to discuss of decisions category:code type:bugfix Pull Requests that fix bugs. labels Sep 27, 2025
GameControllerManager shared one button/stick state between all
connected game controllers. This led to one controller interfering with
other controllers in multiplayer mode.
@Brockengespenst Brockengespenst force-pushed the fix_multiple_game_controllers_interfere_each_other branch from bb5df17 to 615b688 Compare October 1, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:code involves:functionality status:needs-discussion Team member and developers need to discuss of decisions type:bugfix Pull Requests that fix bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants