Skip to content

Commit

Permalink
pico: reformat hid mapping table
Browse files Browse the repository at this point in the history
Should avoid reformatting the table whenever something is missing a new button
  • Loading branch information
Daft-Freak committed Jul 19, 2023
1 parent 28e2502 commit 190c96a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions 32blit-pico/input_usb_hid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ struct GamepadMapping {
uint8_t menu, home, joystick;
};

#define NO 0xFF

static const GamepadMapping gamepad_mappings[]{
{0x057E2009, 3, 2, 1, 0, 17, 16, 19, 18, 8, 12, 11}, // Switch Pro Controller
{0x15320705, 0, 1, 3, 4, 0xFF, 0xFF, 0xFF, 0xFF, 16, 15, 13}, // Razer Raiju Mobile
{0x20D6A711, 2, 1, 3, 0, 0xFF, 0xFF, 0xFF, 0xFF, 8, 12, 10}, // PowerA wired Switch pro controller
{0x00000000, 0, 1, 2, 3, 0xFF, 0xFF, 0xFF, 0xFF, 4, 5, 6} // probably wrong fallback
{0x057E2009, 3, 2, 1, 0, 17, 16, 19, 18, 8, 12, 11}, // Switch Pro Controller
{0x15320705, 0, 1, 3, 4, NO, NO, NO, NO, 16, 15, 13}, // Razer Raiju Mobile
{0x20D6A711, 2, 1, 3, 0, NO, NO, NO, NO, 8, 12, 10}, // PowerA wired Switch pro controller
{0x00000000, 0, 1, 2, 3, NO, NO, NO, NO, 4, 5, 6} // probably wrong fallback
};

#undef NO

// hat -> dpad
const uint32_t dpad_map[]{
blit::Button::DPAD_UP,
Expand Down

0 comments on commit 190c96a

Please sign in to comment.