From f8d7941fe808cd68c10d43f97164398f859a7c3a Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 6 Feb 2019 22:03:44 +0100 Subject: [PATCH] device: fix a bad axis mapping on Linux --- panda/src/device/evdevInputDevice.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/panda/src/device/evdevInputDevice.cxx b/panda/src/device/evdevInputDevice.cxx index b137888d6d..6c1a09b866 100644 --- a/panda/src/device/evdevInputDevice.cxx +++ b/panda/src/device/evdevInputDevice.cxx @@ -82,7 +82,7 @@ static const struct DeviceMapping { {0x28de, 0x1142, InputDevice::DeviceClass::unknown, QB_steam_controller}, // Jess Tech Colour Rumble Pad {0x0f30, 0x0111, InputDevice::DeviceClass::gamepad, 0}, - // Trust GXT 24 + // SPEED Link SL-6535-SBK-01 {0x0079, 0x0006, InputDevice::DeviceClass::gamepad, 0}, // 3Dconnexion Space Traveller 3D Mouse {0x046d, 0xc623, InputDevice::DeviceClass::spatial_mouse, 0}, @@ -521,7 +521,10 @@ init_device() { } break; case ABS_THROTTLE: - if (quirks & QB_rudder_from_throttle) { + if (_device_class == DeviceClass::gamepad) { + // Apparently needed for 8bitdo N30 Pro controller + axis = InputDevice::Axis::right_x; + } else if (quirks & QB_rudder_from_throttle) { axis = InputDevice::Axis::rudder; } else { axis = InputDevice::Axis::throttle;