Skip to content

[Merged by Bors] - Fix gamepad connection system ordering#4313

Closed
ghost wants to merge 1 commit intomainfrom
unknown repository
Closed

[Merged by Bors] - Fix gamepad connection system ordering#4313
ghost wants to merge 1 commit intomainfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Mar 24, 2022

Objective

Solution

  • Change the gamepad_connection_system to run after the InputSystem label.

Reasons

I changed the gamepad_connection_system to run after the InputSystem instead of in parallel, because this system checks the GamepadEvents which get send inside of the gamepad_event_system. This means that the gamepad_connection_system could respond to the events one frame later, instead of instantly resulting in one frame lag.

Old possible case:

  1. gamepad_connection_system (reacts to the GamepadEvents too early)
  2. gamepad_event_system (sends the GamepadEvents)

New fixed ordering:

  1. gamepad_event_system (sends the GamepadEvents)
  2. gamepad_connection_system (reacts to the GamepadEvents)

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Mar 24, 2022
@ghost ghost added C-Bug An unexpected or incorrect behavior A-Input Player input via keyboard, mouse, gamepad, and more and removed S-Needs-Triage This issue needs to be labelled labels Mar 24, 2022
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.

I agree with this logic; it's nice to stamp out one more obviously incorrect system order ambiguity.

@ghost ghost changed the title bevy_input: Fix gamepad connection system ordering Fix gamepad connection system ordering Mar 24, 2022
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 28, 2022
@mockersf
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Mar 29, 2022
# Objective

- Part of the splitting process of #3692.

## Solution

- Change the `gamepad_connection_system` to run after the `InputSystem` label.

## Reasons

I changed the `gamepad_connection_system` to run after the `InputSystem` instead of in parallel, because this system checks the `GamepadEvent`s which get send inside of the `gamepad_event_system`. This means that the `gamepad_connection_system` could respond to the events one frame later, instead of instantly resulting in one frame lag.

Old possible case:
1. `gamepad_connection_system` (reacts to the `GamepadEvent`s too early)
2. `gamepad_event_system` (sends the `GamepadEvent`s)

New fixed ordering:
1. `gamepad_event_system` (sends the `GamepadEvent`s)
2. `gamepad_connection_system` (reacts to the `GamepadEvent`s)
@bors bors bot changed the title Fix gamepad connection system ordering [Merged by Bors] - Fix gamepad connection system ordering Mar 29, 2022
@bors bors bot closed this Mar 29, 2022
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Objective

- Part of the splitting process of bevyengine#3692.

## Solution

- Change the `gamepad_connection_system` to run after the `InputSystem` label.

## Reasons

I changed the `gamepad_connection_system` to run after the `InputSystem` instead of in parallel, because this system checks the `GamepadEvent`s which get send inside of the `gamepad_event_system`. This means that the `gamepad_connection_system` could respond to the events one frame later, instead of instantly resulting in one frame lag.

Old possible case:
1. `gamepad_connection_system` (reacts to the `GamepadEvent`s too early)
2. `gamepad_event_system` (sends the `GamepadEvent`s)

New fixed ordering:
1. `gamepad_event_system` (sends the `GamepadEvent`s)
2. `gamepad_connection_system` (reacts to the `GamepadEvent`s)
@ghost ghost deleted the fix_gamepad_connection_ordering branch August 7, 2022 08:27
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

- Part of the splitting process of bevyengine#3692.

## Solution

- Change the `gamepad_connection_system` to run after the `InputSystem` label.

## Reasons

I changed the `gamepad_connection_system` to run after the `InputSystem` instead of in parallel, because this system checks the `GamepadEvent`s which get send inside of the `gamepad_event_system`. This means that the `gamepad_connection_system` could respond to the events one frame later, instead of instantly resulting in one frame lag.

Old possible case:
1. `gamepad_connection_system` (reacts to the `GamepadEvent`s too early)
2. `gamepad_event_system` (sends the `GamepadEvent`s)

New fixed ordering:
1. `gamepad_event_system` (sends the `GamepadEvent`s)
2. `gamepad_connection_system` (reacts to the `GamepadEvent`s)
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 S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants