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

Upgrade to Bevy 0.15.0-dev. #644

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pcwalton
Copy link

@pcwalton pcwalton commented Oct 8, 2024

Most of the work here was fallout from the gamepads-as-entities change (bevyengine/bevy#12770), as well as the PartialReflect changes.

This relies on bevyengine/bevy#15685. That PR must be applied to Bevy for this to build.

The most recent upstream commit is
4bf647ff3b0ca7c8ca47496db9cfe03702328473.

I'm marking this as a draft because 0.15 isn't out yet.

Most of the work here was fallout from the gamepads-as-entities change
(bevyengine/bevy#12770), as well as the
`PartialReflect` changes.

This relies on bevyengine/bevy#15685. That PR
must be applied to Bevy for this to build.

The most recent upstream commit is
4bf647ff3b0ca7c8ca47496db9cfe03702328473.
@Shute052
Copy link
Collaborator

Shute052 commented Oct 8, 2024

I think we can remove AccumulatedMouseMovement and AccumulatedMouseScroll in user_input/mouse in favour of the upstreamed ones, and the systems of AccumulatorPlugin were included in bevy::InputPlugin

@alice-i-cecile
Copy link
Contributor

alice-i-cecile commented Oct 8, 2024

Yep, I pushed to get that upstreamed because it's really a bevy_input concern :)

@pcwalton I've merged the linked PR: please swap his to point to a pinned commit on main when you get a chance.

Copy link

@s-puig s-puig left a comment

Choose a reason for hiding this comment

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

Nitpicking. I'm not comfortable with LWIM so feel free to ignore~

src/input_map.rs Show resolved Hide resolved
@@ -56,27 +64,27 @@ fn test_app() -> App {
#[ignore = "Broken upstream; tracked in https://github.com/Leafwing-Studios/leafwing-input-manager/issues/419"]
Copy link

Choose a reason for hiding this comment

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

This should be fixed upstream

assert_eq!(events.drain().count(), 0);

let input = GamepadControlAxis::LEFT_X;
input.set_value(app.world_mut(), -1.0);

let mut events = app.world_mut().resource_mut::<Events<GamepadEvent>>();
let mut events = app.world_mut().resource_mut::<Events<RawGamepadEvent>>();
assert_eq!(events.drain().count(), 1);
}

#[test]
#[ignore = "Broken upstream; tracked in https://github.com/Leafwing-Studios/leafwing-input-manager/issues/419"]
Copy link

Choose a reason for hiding this comment

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

Here too. I can't write but there should be one on line 303 that should also be fixed upstream.

@pcwalton
Copy link
Author

pcwalton commented Oct 8, 2024

I've updated to main. Tests are failing intermittently. I think it's a system ordering issue. Sometimes inputs are 1 frame behind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants