(&mut self, app: &mut S, gilrs: &Gilrs)
| 462 | continue; |
| 463 | } |
| 464 | for button in ALL_BUTTONS { |
| 465 | let Some(gilrs_button) = map_button_to_gilrs(button) else { |
| 466 | continue; |
| 467 | }; |
| 468 | let is_down = gp.is_pressed(gilrs_button); |
| 469 | self.set_button(app, gilrs, id, button, is_down); |
| 470 | } |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | fn sync_axes<S: GamepadSink>(&mut self, app: &mut S, gilrs: &Gilrs) { |
| 475 | self.sync_ids.clear(); |
| 476 | self.sync_ids.extend(self.id_to_uuid.keys().copied()); |
| 477 | for id in self.sync_ids.iter().copied() { |
| 478 | let gp = gilrs.gamepad(id); |
| 479 | if !gp.is_connected() || is_joycon(&gp) { |
| 480 | continue; |
| 481 | } |
| 482 | let Some(index) = self |
| 483 | .id_to_uuid |
| 484 | .get(&id) |
| 485 | .and_then(|u| self.uuid_to_index.get(u)) |
| 486 | .copied() |
| 487 | else { |
| 488 | continue; |
| 489 | }; |
| 490 | for axis in ALL_AXES { |
| 491 | let Some(gilrs_axis) = map_axis_to_gilrs(axis) else { |
| 492 | continue; |
no test coverage detected