summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateus Rodrigues Costa <mateusrodcosta@gmail.com>2025-01-03 11:15:30 -0300
committerKate Hsuan <hpa@redhat.com>2025-02-08 07:58:03 +0000
commit351affe12f2e757f37b9ccb6a2eae4f10b609435 (patch)
tree2935f205bf79b2c711ecc59928eeb0999ffed654
parenta16c752e858475810b34462b4668c8c4157d0d5e (diff)
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
-rw-r--r--src/linux/up-device-supply.c6
1 files 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,