bevy/crates/bevy_input
Jean Mertz 9dfef453f9
only update Touches resource when needed (#12048)
# Objective

- The `touch_screen_input_system` system runs on every tick.
- It unconditionally calls `update(&mut self)`, on the `Touches`
resource.
- This blocks the usage of a `resource_changed::<Touches>` run
condition.

## Solution

- Remove `update(&mut self)` as it's only used in this one system, and
in-lining the method implementation removes an indirection to an
ambiguously named method.
- Add conditional checks around the calls to clearing the internal maps.

---------

Signed-off-by: Jean Mertz <git@jeanmertz.com>
2024-02-22 17:57:17 +00:00
..
src only update Touches resource when needed (#12048) 2024-02-22 17:57:17 +00:00
Cargo.toml Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00