Events<GamepadEventRaw> appears to be getting updated twice per world tick (gilrs) #2893
Labels
A-Input
Player input via keyboard, mouse, gamepad, and more
C-Bug
An unexpected or incorrect behavior
D-Trivial
Nice and easy! A great choice to get started with Bevy
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
Bevy version
git master
What you did
Looked at the code (I'm playing around with building a custom mini engine using bevy ECS, for learning purposes).
What you expected to happen
Events::update
says it should be called once per tick, to manage the double buffer correctly.What actually happened
update
appears to be getting called twice per tick:bevy_input
callsadd_event::<GamepadEventRaw>
bevy/crates/bevy_input/src/lib.rs
Line 65 in 9919933
and this registers the
Event::update_system
bevy/crates/bevy_app/src/app.rs
Lines 583 to 589 in 9919933
bevy_gilrs
'sgilrs_event_system
callsevent.update
on theEvents<GamepadEventRaw>
bevy/crates/bevy_gilrs/src/gilrs_system.rs
Lines 19 to 23 in 9919933
Additional information
It's possible I'm just misunderstanding what's going on here, but this seems wrong at first glance. At the very least, the
update
call inbevy_gilrs
probably deserves a comment calling out that it's a secondupdate
call in the simulation tick explaining why we want to discard the double buffer in this case.The text was updated successfully, but these errors were encountered: