MCPcopy Create free account
hub / github.com/PerroEngine/Perro / map_axis

Function map_axis

perro_source/render_stack/perro_app/src/input/gamepad.rs:577–588  ·  view source on GitHub ↗
(axis: Axis)

Source from the content-addressed store, hash-verified

575 }
576 }
577
578 #[cfg(target_os = "windows")]
579 fn poll_xinput<S: GamepadSink>(&mut self, app: &mut S) {
580 if self.xinput.is_none() {
581 self.xinput = XInputHandle::load_default().ok();
582 }
583 let Some(handle) = self.xinput.as_ref() else {
584 return;
585 };
586 let states: Vec<_> = (0..4_u32)
587 .map(|slot| (slot as usize, handle.get_state(slot).ok()))
588 .collect();
589
590 for (slot, state) in states {
591 let index = self.xinput_app_index(slot);

Callers 1

handle_eventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected