@@ -62,6 +62,9 @@ enum QuirkBits {
62
62
// We only connect it if it is reporting any events, because when Steam is
63
63
// running, the Steam controller is muted in favour of a dummy Xbox device.
64
64
QB_steam_controller = 32 ,
65
+
66
+ // Axes on the right stick are swapped, using x for y and vice versa.
67
+ QB_right_axes_swapped = 64 ,
65
68
};
66
69
67
70
static const struct DeviceMapping {
@@ -81,7 +84,7 @@ static const struct DeviceMapping {
81
84
// Steam Controller (wireless)
82
85
{0x28de , 0x1142 , InputDevice::DeviceClass::unknown, QB_steam_controller},
83
86
// Jess Tech Colour Rumble Pad
84
- {0x0f30 , 0x0111 , InputDevice::DeviceClass::gamepad, 0 },
87
+ {0x0f30 , 0x0111 , InputDevice::DeviceClass::gamepad, QB_rstick_from_z | QB_right_axes_swapped },
85
88
// SPEED Link SL-6535-SBK-01
86
89
{0x0079 , 0x0006 , InputDevice::DeviceClass::gamepad, 0 },
87
90
// 8bitdo N30 Pro Controller
@@ -488,7 +491,11 @@ init_device() {
488
491
break ;
489
492
case ABS_Z:
490
493
if (quirks & QB_rstick_from_z) {
491
- axis = InputDevice::Axis::right_x;
494
+ if (quirks & QB_right_axes_swapped) {
495
+ axis = InputDevice::Axis::right_y;
496
+ } else {
497
+ axis = InputDevice::Axis::right_x;
498
+ }
492
499
} else if (_device_class == DeviceClass::gamepad) {
493
500
axis = InputDevice::Axis::left_trigger;
494
501
have_analog_triggers = true ;
@@ -514,7 +521,11 @@ init_device() {
514
521
break ;
515
522
case ABS_RZ:
516
523
if (quirks & QB_rstick_from_z) {
517
- axis = InputDevice::Axis::right_y;
524
+ if (quirks & QB_right_axes_swapped) {
525
+ axis = InputDevice::Axis::right_x;
526
+ } else {
527
+ axis = InputDevice::Axis::right_y;
528
+ }
518
529
} else if (_device_class == DeviceClass::gamepad) {
519
530
axis = InputDevice::Axis::right_trigger;
520
531
have_analog_triggers = true ;
0 commit comments