pub fn compute_released_buttons(
previous_held: &GamepadButtonSet,
values: &[f64],
) -> GamepadButtonSetExpand description
Folds one frame of raw gamepad readings into the per-pad edge sets.
The held set this frame is every button at or above half pressure; the released set is every button that was held last frame and is no longer down, which is what a caller polls with to fire a one-shot action on button-up.
§Arguments
&GamepadButtonSet- The previous frame’s held button indices.&[f64]- This frame’s raw button pressure per button index.
§Returns
GamepadButtonSet- The buttons that came up on this frame.