ChrisNZL / Tallowmere2

Changelog, issue tracker, and development knowledge for Tallowmere 2.
https://tallowmere2.com
13 stars 0 forks source link

Steam Input + Couch Co-op: Players can't perform actions simultaneously #1167

Closed ChrisNZL closed 1 year ago

ChrisNZL commented 1 year ago

Found in 0.3.7i.

If Steam Input is enabled and Steam Input is the selected controller module, players can't perform actions independently of each other. If one player is pressing a button, other buttons/actions are not getting processed for other players.

Likely a bug with my GamepadAPI code for Steam Input specifically. Probably calling break somewhere instead of continue or something.

Tested with a PS4+PS5 controller, and an Xbox One + PS5 controller. Affects both.

Button presses are detected in the Controller Debugger properly.

Does not affect InControl; this bug is not present if InControl is being used.

ChrisNZL commented 1 year ago

Fixed in 0.3.7p.

Culprit was, when a controller button gets pressed, if the hidden system player's input device is not the controller, the system player gets assigned the input device silently.

Previously, the assignment would call the game's InputPrevent.PreventInput method, in an attempt to prevent accidental actions being executed on first button being pressed.

Why this would not affect InControl, I'm not sure, but it was affecting Steam Input.

But now, such controller-assigning no longer calls PreventInput for the frame, and things are working again for Couch Co-op.