From 8119547e9015ce90ab28c3191ec9a1f4b614f9bb Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 31 Dec 2018 13:12:40 +0100 Subject: [PATCH] device: add hacky detection of Trust GXT 24 as gamepad for now --- panda/src/device/evdevInputDevice.cxx | 2 ++ panda/src/device/winRawInputDevice.cxx | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/panda/src/device/evdevInputDevice.cxx b/panda/src/device/evdevInputDevice.cxx index a5c916d8bc..610fb8722a 100644 --- a/panda/src/device/evdevInputDevice.cxx +++ b/panda/src/device/evdevInputDevice.cxx @@ -73,6 +73,8 @@ static const struct DeviceMapping { {0x045e, 0x0719, InputDevice::DeviceClass::gamepad, QB_connect_if_nonzero}, // Jess Tech Colour Rumble Pad {0x0f30, 0x0111, InputDevice::DeviceClass::gamepad, 0}, + // Trust GXT 24 + {0x0079, 0x0006, InputDevice::DeviceClass::gamepad, 0}, // 3Dconnexion Space Traveller 3D Mouse {0x046d, 0xc623, InputDevice::DeviceClass::spatial_mouse, 0}, // 3Dconnexion Space Pilot 3D Mouse diff --git a/panda/src/device/winRawInputDevice.cxx b/panda/src/device/winRawInputDevice.cxx index 1af01cd4b4..f49a7e0d7f 100644 --- a/panda/src/device/winRawInputDevice.cxx +++ b/panda/src/device/winRawInputDevice.cxx @@ -273,6 +273,11 @@ on_arrival(HANDLE handle, const RID_DEVICE_INFO &info, std::string name) { // Well, it claims to be a gamepad... _device_class = DeviceClass::gamepad; } + //TODO: better solution for this + if (_vendor_id == 0x0079 && _product_id == 0x0006) { + // Trust GXT 24 + _device_class = DeviceClass::gamepad; + } // Mice } else if (info.hid.usUsagePage == HID_USAGE_PAGE_GENERIC &&