| 527 | gp.name(), |
| 528 | down_mask, |
| 529 | lx, |
| 530 | ly, |
| 531 | rx, |
| 532 | ry, |
| 533 | lt, |
| 534 | rt |
| 535 | ); |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | fn map_button(button: Button) -> Option<GamepadButton> { |
| 540 | let mapped = match button { |
| 541 | Button::South => GamepadButton::Bottom, |
| 542 | Button::East => GamepadButton::Right, |
| 543 | Button::West => GamepadButton::Left, |
| 544 | Button::North => GamepadButton::Top, |
| 545 | Button::DPadUp => GamepadButton::DpadUp, |
| 546 | Button::DPadDown => GamepadButton::DpadDown, |
| 547 | Button::DPadLeft => GamepadButton::DpadLeft, |
| 548 | Button::DPadRight => GamepadButton::DpadRight, |
| 549 | Button::Start => GamepadButton::Start, |
| 550 | Button::Select => GamepadButton::Select, |
| 551 | Button::Mode => GamepadButton::Home, |
| 552 | Button::LeftTrigger => GamepadButton::L1, |
| 553 | Button::RightTrigger => GamepadButton::R1, |
| 554 | Button::LeftTrigger2 => GamepadButton::L2, |