Commit Graph
37 Commits
Author SHA1 Message Date
Vicki Pfau 8e644111c2 gamepad_db: Remove obsolete entry
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This autodetects properly with modern SDL as-is
2025-12-04 21:35:59 -08:00
Vicki Pfau 9fd3dbfc42 switch2: Remove some unneeded init commands
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
These commands seem to be queries the console sends, not setup
2025-11-13 20:46:46 -08:00
Vicki Pfau f0d4aca03d switch2: Bring up IMU support 2025-11-13 20:46:46 -08:00
Vicki Pfau ae6cdea0fa switch2: Refactor and clean up rumble code a bit 2025-11-13 20:46:46 -08:00
Vicki Pfau 4037c258a1 testcontroller: Fix crash when unplugging a controller while calibrating gyro 2025-10-22 20:10:21 -07:00
Vicki Pfau d635a064aa switch2: Read out serial number 2025-10-18 07:57:30 -07:00
Vicki Pfau e4b763f9f8 switch2: Enable grip buttons on charging grip 2025-10-18 07:57:30 -07:00
Vicki Pfau b152c9fb3c switch2: Refactor out flash reading 2025-10-18 07:57:30 -07:00
Vicki Pfau ee4c2ce120 switch2: The reply to the LED packet is only 8 bytes 2025-10-18 07:57:30 -07:00
Vicki Pfau 82374b4778 switch2: Use report ID 5 for all controllers 2025-10-18 07:57:30 -07:00
Vicki Pfau 061ce935df switch2: Simplify init data array 2025-10-18 07:57:30 -07:00
Vicki Pfau c89fed4eae switch2: Preliminary rumble support
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fused controller support is somewhat lacking, and the scaling and frequency
on rumble is somewhat arbitrary, but otherwise it works fine.
2025-10-11 14:04:52 -07:00
Vicki Pfau ef99341691 switch2: Move initialization after reading calibration
This removes the need to wait for initialization to finish
2025-10-11 14:04:52 -07:00
Vicki Pfau 70bfdd013a switch2: Send full init sequence from real hardware 2025-10-11 14:04:52 -07:00
Vicki Pfau cdc1922801 switch2: This is the zero point, not the max 2025-10-11 14:04:52 -07:00
Vicki Pfau ed2cdceb66 switch2: Read user calibration data 2025-09-24 18:15:07 -07:00
Vicki Pfau 184f6fa231 switch2: Read calibration data 2025-08-29 05:46:19 -07:00
Vicki Pfau 5f4416bc42 joystick: Improve Xbox controller mapping with xpad quirks (#13305)
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
xpad has a series of questionable design choices when it comes to button
mapping. Notably, BTN_TRIGGER_HAPPY1-4 are used for the D-pad on dance mats
instead of the typical BTN_DPAD_*, and maps the paddles to
BTN_TRIGGER_HAPPY5-8. This commit plumbs through driver detection for a udev
device and adds special exceptions for xpad's quirks.

Newer kernels (6.17+) add the BTN_GRIP* mappings for paddles on controllers. We
should prefer that if available, as its meaning and mapping is unambiguous.
However, since it's only in new kernels, we need to maintain the older mappings
where we know they exist.

It also exposes KEY_RECORD as the share button regardless of vendor, which had
previously been gated behind being a Microsoft controller. All Xbox Series
controllers can include this button, and many third party ones do.
2025-07-28 20:03:51 -07:00
Vicki Pfau 8442d4f0f7 joystick: Add support Xbox Adaptive Controller
The Xbox Adaptive Controller reports the pressed guide button state as 2
instead of 1. This is contrary to the spec, but it's needed for the guide
button to work.

This also adds a bit more documentation on observed-but-not-known GUIDs.
2025-06-24 16:51:18 -07:00
Vicki Pfau 7dd5e765df joystick: Report battery on GIP controllers
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-06-05 18:34:22 -07:00
Vicki Pfau c54a017f47 joystick: Clean up Elite Button handling 2025-06-05 18:34:22 -07:00
Vicki Pfau 559efd58e2 joystick: Add headset stub to GIP driver 2025-06-05 18:34:22 -07:00
Vicki Pfau 4cd889cb13 joystick: Several minor GIP fixes
This mostly fixes stylistic issues, but also fixes an issue with some
controllers where an erroneous check would clear the DLI flag, offsetting the
share button index so it wouldn't work.
2025-05-22 21:45:00 -07:00
Vicki Pfau cf62637261 joystick: Add support for Xbox One Chatpad attachment 2025-05-13 17:30:39 -07:00
Vicki Pfau 7b3bd8c538 joystick: Improve GIP metadata retry
This reduces the number of retries, since they almost never help, and always
attempts the fallback if metadata fails enough times.
2025-05-08 16:41:26 -07:00
Vicki Pfau 367cf9ba63 joystick: Always continue processing GIP packets
This loop breakout was originally from an attempt to parse coalesced packets.
Breaking out early does more harm than good, and no devices coalesce packets,
so this is unnecessary.
2025-05-08 16:41:26 -07:00
Vicki Pfau 955a49c883 joystick: Add quirk for no impulse vibration on the Spectra Pro 2025-05-08 16:41:26 -07:00
Vicki Pfau 82899501b5 joystick: Fix GIP fast ACK issue
By moving the message sending onto the main thread and adding a small timeout
we can now ensure the ACKs are sent fast enough to avoid the firmware bugs in
these controllers.
2025-05-08 16:41:26 -07:00
Vicki Pfau 9e0edea16f joystick: Assume GIP gamepads have the LED command if no metadata is present 2025-05-08 16:41:26 -07:00
Vicki Pfau 9a96960728 joystick: Sort out GIP vendor messages into the supported interfaces 2025-05-08 16:41:26 -07:00
Vicki Pfau 72dd79752e joystick: Add initial support for GIP flight sticks
At the moment, only the ThrustMaster T.Flight Hotas One has full support. The
documentation says you can query the extra buttons via a specific command, but
the stick appears to reject the command. Further investigation is needed for
automatically querying this state.
2025-05-08 16:41:26 -07:00
Vicki Pfau 2248d3812e joystick: Rework GIP code to allow separate states for individual attachments
This is needed for future work bringing up things like the chatpad.

This commit also fixes a few minor things, such as still sending motor packets
to devices that don't support it, enabling quirks that hide trigger rumble on
devices that are marked as not having it, and fixing #12942.
2025-05-08 16:41:26 -07:00
Vicki Pfau 00f3a82ada Joystick: Add new GIP driver to replace old Xbox One wired driver
This new driver is based on official documentation released by Microsoft in
September, though it still lacks several important features, notably the
Security handshake for wireless dongles and audio support. It is, however, more
reliable and extensible than the old driver.
2025-05-01 11:04:33 -07:00
Vicki Pfau ceb9fecfc1 Joystick: Add trigger rumble resend
This was already present for regular rumble to ensure that controllers would
continue rumbling for extended periods, but was missing for trigger rumble. I
don't know if this affects any controllers at the moment, but it's helpful for
future-proofing.
2025-04-23 19:23:11 -07:00
Vicki Pfau 19445339b8 evdev INPUT_PROP_SEMI_MT devices should be early-detected as touchpads
Some psmouse touchpads were being misdetected as joysticks due to only having
INPUT_PROP_SEMI_MT and INPUT_PROP_POINTER as well as having BTN_1
2024-04-15 03:26:29 -10:00
Vicki Pfau bec1b8f849 Add basic rumble support to Steam Deck 2024-01-01 21:46:38 -08:00
Vicki Pfau a8f4f40d08 Sync more Steam Controller header definitions for the Steam Deck 2023-12-19 20:18:37 -08:00