(app: &mut S, index: usize)
| 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), |
no test coverage detected