diff --git a/src/input_reader.rs b/src/input_reader.rs index 4d101c9..22c2f0e 100644 --- a/src/input_reader.rs +++ b/src/input_reader.rs @@ -108,9 +108,9 @@ impl InputReader<'_, '_> { fn reset_input(&mut self) { self.tracker.key_codes.clear(); self.tracker.modifiers = KeyboardModifiers::empty(); + self.tracker.mouse_buttons.clear(); self.tracker.mouse_motion = None; self.tracker.mouse_wheel = None; - self.tracker.mouse_buttons.clear(); self.tracker.gamepad_buttons.clear(); self.tracker.gamepad_axes.clear(); } @@ -229,9 +229,9 @@ struct InputTracker { ignore_mouse: bool, key_codes: HashMap, modifiers: KeyboardModifiers, + mouse_buttons: HashMap, mouse_motion: Option, mouse_wheel: Option, - mouse_buttons: HashMap, gamepad_buttons: HashMap, gamepad_axes: HashMap, }