(&mut self)
| 53 | |
| 54 | /// Start a new frame. |
| 55 | /// |
| 56 | /// Applies queued script commands, clears one-frame device edges, clears |
| 57 | /// one-frame action edges, and refreshes persistent action-down bits. |
| 58 | #[inline] |
| 59 | pub fn begin_frame(&mut self) { |
| 60 | self.apply_queued_commands(); |
| 61 | self.keyboard.begin_frame(); |
| 62 | self.mouse.begin_frame(); |
| 63 | for pad in &mut self.gamepads { |
| 64 | pad.begin_frame(); |
| 65 | } |
| 66 | for jc in &mut self.joycons { |
| 67 | jc.begin_frame(); |
| 68 | } |
| 69 | for player in &mut self.players { |
| 70 | player.begin_frame(); |
| 71 | } |
| 72 | self.action_pressed.fill(0); |
| 73 | self.action_released.fill(0); |
| 74 | self.refresh_all_action_down(); |
nothing calls this directly
no test coverage detected