mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Merge pull request #759 from l3iggs/wireless360receiver
fix up XBox 360 controller wireless receiver
This commit is contained in:
commit
e3fadb85b8
@ -449,6 +449,8 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id,
|
||||
strlcpy(name_buf, "MUCH iReadyGo i5", sizeof(name_buf));
|
||||
else if (strstr(device_name, "Wikipad"))
|
||||
strlcpy(name_buf, "Wikipad", sizeof(name_buf));
|
||||
else if (strstr(device_name, "360 Wireless"))
|
||||
strlcpy(name_buf, "XBox 360 Wireless", sizeof(name_buf));
|
||||
else if (strstr(device_name, "Microsoft"))
|
||||
{
|
||||
if (strstr(device_name, "Dual Strike"))
|
||||
@ -456,7 +458,6 @@ static void handle_hotplug(void *data, unsigned *port, unsigned id,
|
||||
else if (strstr(device_name, "SideWinder"))
|
||||
strlcpy(name_buf, "SideWinder Classic", sizeof(name_buf));
|
||||
else if (strstr(device_name, "X-Box 360")
|
||||
|| strstr(device_name, "Xbox 360 Wireless Receiver")
|
||||
|| strstr(device_name, "X-Box"))
|
||||
strlcpy(name_buf, "XBox 360", sizeof(name_buf));
|
||||
}
|
||||
|
@ -564,6 +564,32 @@ DECL_AXIS(r_x_minus, -2) \
|
||||
DECL_AXIS(r_y_plus, +3) \
|
||||
DECL_AXIS(r_y_minus, -3)
|
||||
|
||||
#define XBOX360_WIRELESS_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 97) \
|
||||
DECL_BTN(b, 96) \
|
||||
DECL_BTN(x, 100) \
|
||||
DECL_BTN(y, 99) \
|
||||
DECL_BTN(start, 108) \
|
||||
DECL_BTN(select, 4) \
|
||||
DECL_BTN(up, 19) \
|
||||
DECL_BTN(down, 20) \
|
||||
DECL_BTN(left, 21) \
|
||||
DECL_BTN(right, 22) \
|
||||
DECL_BTN(l, 102) \
|
||||
DECL_BTN(r, 103) \
|
||||
DECL_AXIS(l2, +6) \
|
||||
DECL_AXIS(r2, +7) \
|
||||
DECL_BTN(l3, 106) \
|
||||
DECL_BTN(r3, 107) \
|
||||
DECL_AXIS(l_x_plus, +0) \
|
||||
DECL_AXIS(l_x_minus, -0) \
|
||||
DECL_AXIS(l_y_plus, +1) \
|
||||
DECL_AXIS(l_y_minus, -1) \
|
||||
DECL_AXIS(r_x_plus, +2) \
|
||||
DECL_AXIS(r_x_minus, -2) \
|
||||
DECL_AXIS(r_y_plus, +3) \
|
||||
DECL_AXIS(r_y_minus, -3)
|
||||
|
||||
#define XBOX360_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 97) \
|
||||
DECL_BTN(b, 96) \
|
||||
@ -812,6 +838,7 @@ const char* const input_builtin_autoconfs[] =
|
||||
DECL_AUTOCONF_DEVICE("SideWinder Classic", "android", SIDEWINDER_CLASSIC_DEFAULT_BINDS),
|
||||
DECL_AUTOCONF_DEVICE("MUCH iReadyGo i5", "android", MUCH_IREADYGO_I5_DEFAULT_BINDS),
|
||||
DECL_AUTOCONF_DEVICE("XBox 360", "android", XBOX360_DEFAULT_BINDS),
|
||||
DECL_AUTOCONF_DEVICE("XBox 360 Wireless", "android", XBOX360_WIRELESS_DEFAULT_BINDS),
|
||||
DECL_AUTOCONF_DEVICE("Sega Virtua Stick", "android", SEGA_VIRTUA_STICK_DEFAULT_BINDS),
|
||||
DECL_AUTOCONF_DEVICE("PlayStation2 JCPS102", "android", PS2_JCPS102_DEFAULT_BINDS),
|
||||
DECL_AUTOCONF_DEVICE("PlayStation2 Generic", "android", PS2_GENERIC_DEFAULT_BINDS),
|
||||
|
Loading…
x
Reference in New Issue
Block a user