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

Send GamepadEvent for gamepads connected at startup #12424

Merged
merged 1 commit into from Mar 11, 2024

Conversation

uwuPyxl
Copy link
Contributor

@uwuPyxl uwuPyxl commented Mar 11, 2024

Objective

  • Fix GamepadEvent::Connection not being sent for devices connected at startup.

Solution

  • GamepadConnectionEvent was being sent directly for gamepads connected at startup, which causes consumers of GamepadEvent to not receive those events.
  • Instead send GamepadEvent. The gamepad_event_system splits GamepadEvent up, so consumers of GamepadConnectionEvent will still receive the events.

Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Really nice: I've seen this bug in other engines.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Input Player input via keyboard, mouse, gamepad, and more labels Mar 11, 2024
@james7132 james7132 added this pull request to the merge queue Mar 11, 2024
Merged via the queue into bevyengine:main with commit 309745c Mar 11, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants