From 351affe12f2e757f37b9ccb6a2eae4f10b609435 Mon Sep 17 00:00:00 2001 From: Mateus Rodrigues Costa Date: Fri, 3 Jan 2025 11:15:30 -0300 Subject: [PATCH] linux: device_supply: Prioritize Gaming Input The DualSense and DualShock 4 have 3 main components: the gamepad proper, a touchpad and motion sensors. They also have an extra component in the form of a headphone jack, which is only available via BT on the PlayStation consoles but can be used on other devices via USB. Commit 00eb31a63c43771496e5789f4eb2447b7a1afb6d increased the priority of Gaming Input so the controllers weren't accidentally identified as only the Touchpad, which works on BT. This commit prioritizes Gaming Input over Audio Device, fixing an issue that only happens on USB. Resolves: #296 --- src/linux/up-device-supply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index 992bf2a..aa52b85 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -354,16 +354,16 @@ up_device_supply_sibling_discovered_guess_type (UpDevice *device, * a keyboard, a touchpad, and... etc, for example Sony DualShock4 joystick. * A mouse and a touchpad may include a mouse and a keyboard. * Therefore, the priority is: - * 1. Audio - * 2. Gaming_input + * 1. Gaming_input + * 2. Audio * 3. Keyboard * 4. Tablet * 5. Touchpad * 6. Mouse */ UpDeviceKind priority[] = { - UP_DEVICE_KIND_OTHER_AUDIO, UP_DEVICE_KIND_GAMING_INPUT, + UP_DEVICE_KIND_OTHER_AUDIO, UP_DEVICE_KIND_KEYBOARD, UP_DEVICE_KIND_TABLET, UP_DEVICE_KIND_TOUCHPAD,