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

Function clear_gamepad

perro_source/render_stack/perro_app/src/input/gamepad.rs:602–611  ·  view source on GitHub ↗
(app: &mut S, index: usize)

Source from the content-addressed store, hash-verified

600 };
601
602 if !self.xinput_connected[slot] {
603 app.set_gamepad_connected(index, true);
604 eprintln!("[gamepad][xinput] connected slot={slot} index={index}");
605 }
606 self.xinput_connected[slot] = true;
607 let pad = state.raw.Gamepad;
608 let buttons = pad.wButtons;
609 for (button, mask) in [
610 (GamepadButton::DpadUp, 0x0001),
611 (GamepadButton::DpadDown, 0x0002),
612 (GamepadButton::DpadLeft, 0x0004),
613 (GamepadButton::DpadRight, 0x0008),
614 (GamepadButton::Start, 0x0010),

Callers 2

handle_eventMethod · 0.85
handle_disconnectMethod · 0.85

Calls 4

set_gamepad_axisMethod · 0.45
set_gamepad_gyroMethod · 0.45
set_gamepad_accelMethod · 0.45

Tested by

no test coverage detected