mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Merge pull request #5673 from danieljg/usbgeneric
Introduce button mappings for generic usb controller
This commit is contained in:
commit
7b30868a29
@ -86,10 +86,10 @@ static void hidpad_nesusb_packet_handler(void *data, uint8_t *packet, uint16_t s
|
|||||||
uint32_t i, pressed_keys;
|
uint32_t i, pressed_keys;
|
||||||
static const uint32_t button_mapping[17] =
|
static const uint32_t button_mapping[17] =
|
||||||
{
|
{
|
||||||
NO_BTN,
|
RETRO_DEVICE_ID_JOYPAD_L2,
|
||||||
NO_BTN,
|
RETRO_DEVICE_ID_JOYPAD_R2,
|
||||||
NO_BTN,
|
RETRO_DEVICE_ID_JOYPAD_L,
|
||||||
NO_BTN,
|
RETRO_DEVICE_ID_JOYPAD_R,
|
||||||
RETRO_DEVICE_ID_JOYPAD_SELECT,
|
RETRO_DEVICE_ID_JOYPAD_SELECT,
|
||||||
RETRO_DEVICE_ID_JOYPAD_START,
|
RETRO_DEVICE_ID_JOYPAD_START,
|
||||||
NO_BTN,
|
NO_BTN,
|
||||||
@ -100,8 +100,8 @@ static void hidpad_nesusb_packet_handler(void *data, uint8_t *packet, uint16_t s
|
|||||||
NO_BTN,
|
NO_BTN,
|
||||||
RETRO_DEVICE_ID_JOYPAD_B,
|
RETRO_DEVICE_ID_JOYPAD_B,
|
||||||
RETRO_DEVICE_ID_JOYPAD_A,
|
RETRO_DEVICE_ID_JOYPAD_A,
|
||||||
NO_BTN,
|
RETRO_DEVICE_ID_JOYPAD_Y,
|
||||||
NO_BTN,
|
RETRO_DEVICE_ID_JOYPAD_X,
|
||||||
16, /* HOME BUTTON when pressing SELECT+START */
|
16, /* HOME BUTTON when pressing SELECT+START */
|
||||||
};
|
};
|
||||||
struct hidpad_nesusb_data *device = (struct hidpad_nesusb_data*)data;
|
struct hidpad_nesusb_data *device = (struct hidpad_nesusb_data*)data;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
struct hidpad_psxadapter_data
|
struct hidpad_psxadapter_data
|
||||||
{
|
{
|
||||||
struct pad_connection* connection;
|
struct pad_connection* connection;
|
||||||
uint8_t data[8];
|
uint8_t data[64];
|
||||||
uint32_t slot;
|
uint32_t slot;
|
||||||
uint64_t buttons;
|
uint64_t buttons;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user