Commit 223b1284 authored by Jan Holthuis's avatar Jan Holthuis
Browse files

linux-dist: Separate xpad and xboxdrv controller mappings

parent 32c3cca6
......@@ -34,10 +34,14 @@
*controller.mapping = &controller_mapping_gcwz;
#else
if (strcmp(name, "Microsoft X-Box 360 pad") == 0 ||
strcmp(name, "Xbox 360 Wireless Receiver (XBOX)") == 0 ||
strstr(name, "Xbox Gamepad (userspace driver)") != NULL)
strcmp(name, "Xbox 360 Wireless Receiver") == 0 ||
strcmp(name, "Xbox 360 Wireless Receiver (XBOX)") == 0)
{
controller->mapping = &controller_mapping_xbox360;
controller->mapping = &controller_mapping_xpad;
}
else if (strstr(name, "Xbox Gamepad (userspace driver)") != NULL)
{
controller->mapping = &controller_mapping_xboxdrv;
}
else if (strstr(name, "keyboard") != NULL ||
strstr(name, "Keyboard") != NULL)
......
......@@ -56,8 +56,8 @@
KEY_RIGHTCTRL
};
ControllerMapping controller_mapping_xbox360 = {
"XBox360 Controller",
ControllerMapping controller_mapping_xpad = {
"Xbox 360 Controller (xpad driver)",
BTN_A,
BTN_B,
BTN_TL,
......@@ -87,6 +87,37 @@
ABS_RZ
};
ControllerMapping controller_mapping_xboxdrv = {
"Xbox 360 Controller (xboxdrv userspace driver)",
BTN_A,
BTN_B,
BTN_TL,
BTN_TR,
BTN_X,
BTN_Y,
BTN_THUMBL,
BTN_START,
BTN_SELECT,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
ABS_HAT0X,
ABS_HAT0Y,
ABS_HAT1X,
ABS_HAT1Y,
ABS_X,
ABS_Y,
ABS_BRAKE,
ABS_GAS
};
ControllerMapping controller_mapping_gcwz = {
"GCW Zero",
0x1D, // GCWZ_BTN_A
......
......@@ -36,6 +36,7 @@ typedef struct s_evdev_controller_mapping ControllerMapping;
extern ControllerMapping controller_mapping_generic;
extern ControllerMapping controller_mapping_keyboard;
extern ControllerMapping controller_mapping_xbox360;
extern ControllerMapping controller_mapping_xpad;
extern ControllerMapping controller_mapping_xboxdrv;
extern ControllerMapping controller_mapping_gcwz;
extern ControllerMapping controller_mapping_pandora;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment