mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(Android) Add default binds for 360 pad
This commit is contained in:
parent
47fc344ea6
commit
41a83fdbf2
@ -501,8 +501,13 @@ static void handle_hotplug(void *data, unsigned port, unsigned id,
|
||||
device = DEVICE_MS_SIDEWINDER_DUAL_STRIKE;
|
||||
else if (strstr(name_buf, "SideWinder"))
|
||||
device = DEVICE_MS_SIDEWINDER;
|
||||
else if (strstr(name_buf, "X-Box 360") || strstr(name_buf, "X-Box")
|
||||
else if (strstr(name_buf, "X-Box 360")
|
||||
|| strstr(name_buf, "Xbox 360 Wireless Receiver"))
|
||||
{
|
||||
device = DEVICE_MS_XBOX;
|
||||
strlcpy(name_buf, "XBox 360", sizeof(name_buf));
|
||||
}
|
||||
else if (strstr(name_buf, "X-Box"))
|
||||
device = DEVICE_MS_XBOX;
|
||||
}
|
||||
else if (strstr(name_buf, "WiseGroup"))
|
||||
|
@ -67,6 +67,32 @@ 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) \
|
||||
DECL_BTN(x, 100) \
|
||||
DECL_BTN(y, 99) \
|
||||
DECL_BTN(start, 108) \
|
||||
DECL_BTN(select, 4) \
|
||||
DECL_AXIS(up, -5) \
|
||||
DECL_AXIS(down, +5) \
|
||||
DECL_AXIS(left, -4) \
|
||||
DECL_AXIS(right, +4) \
|
||||
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 RUMBLEPAD2_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 190) \
|
||||
DECL_BTN(b, 189) \
|
||||
@ -104,10 +130,13 @@ const char* const input_builtin_autoconfs[] =
|
||||
"input_driver = \"android\" \n"
|
||||
RUMBLEPAD2_DEFAULT_BINDS,
|
||||
|
||||
"input_device = \"XBox 360\" \n"
|
||||
"input_driver = \"android\" \n"
|
||||
XBOX360_DEFAULT_BINDS,
|
||||
|
||||
"input_device = \"PlayStation3\" \n"
|
||||
"input_driver = \"android\" \n"
|
||||
SIXAXIS_DEFAULT_BINDS,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user