Commit Graph

918 Commits

Author SHA1 Message Date
Sam Lantinga
6493be9eea Removed SDL_AUTO_ENABLE_ENHANCED_FLYDIGI 2025-11-03 08:20:41 -08:00
Sam Lantinga
889e4787d6 Clarify when we want to auto-enable Apex 5 enhanced functionality 2025-11-02 11:14:41 -08:00
Sam Lantinga
eb87a36940 Fixed the right touchpad calculation for the BLE Steam Controller
Fixes https://github.com/libsdl-org/SDL/issues/14368
2025-11-02 08:31:37 -08:00
Sam Lantinga
a82e8a701d Allow dynamically switching mode of the Apex 5 controller
The controller can be in XInput mode or enhanced mode, so it will always show up as an XInput controller, and the enhanced mode controller will come and go as enhanced mode is enabled or disabled in the FlyDigi Space Station app.
2025-11-01 14:49:31 -07:00
Sam Lantinga
28849fd789 Manually enable acquiring the Apex 5 controller if necessary
The FlyDigi Space Station app isn't available on non-Windows platforms, so we need to manually enable acquiring the controller on those platforms.
2025-11-01 14:49:31 -07:00
Sam Lantinga
446fb65ca6 Mark the Apex 5 controller as being acquired by SDL 2025-10-30 22:35:06 -07:00
Sam Lantinga
1502c2fd8b Added support for the Flydigi Apex 5 controller (#14218) 2025-10-30 21:20:44 -07:00
Eddy Jansson
aaee09d6ed Don't do NULL-checks before SDL_free()
Replaces the pattern

  if (ptr) {
    SDL_free(ptr);
  }

with

  SDL_free(ptr);
2025-10-20 00:13:09 -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
Oleksandr Manenko
901173aee6 Fix thread safety attributes for TryLock functions
Changed SDL_TRY_ACQUIRE and SDL_TRY_ACQUIRE_SHARED success value
from 0 to true for functions that now return bool instead of int.
This fixes false positives/negatives in Clang's thread safety analysis.
2025-10-14 12:47:20 -07:00
Sam Lantinga
361f7e0873 Fixed power state reporting for the Nintendo Joy-Con Charging Grip 2025-10-13 10:34:22 -07:00
Anonymous Maarten
a472f5ea1e Fix MSVC syntax error
Fixes the following error:
`
error C2059: syntax error: '}'
`
2025-10-13 01:19:17 +02:00
Vicki Pfau
c89fed4eae switch2: Preliminary rumble support
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
Sam Lantinga
33a74c7548 Fixed typo 2025-09-25 07:31:07 -07:00
Vicki Pfau
ed2cdceb66 switch2: Read user calibration data 2025-09-24 18:15:07 -07:00
zuiki_inn
fc648e5546 Support ZUIKI MasconPro (#13770)
* Add ZUIKI controller

Support version:
MasconPro

Enable rumble
Disable sensors
2025-09-21 23:38:28 -07:00
Sam Lantinga
1aba421bd3 Wait briefly after enabling effects on DualSense controller
The rumble motors apparently take a short time to power up after enabling enhanced mode.

Fixes https://github.com/libsdl-org/SDL/issues/13909
2025-09-14 09:59:01 -07:00
mitchellcairns
78e0ec7e0d SInput: Version as a capabilities vehicle (#13667)
* SInput: version capabilities compression

This commit includes additions relating to SInput generic device reporting capabilities in a bit more detail, to automatically choose the best input map possible for the given device.

Thanks to Antheas Kapenekakis (git@antheas.dev) for contributing the neat compression algorithm, this is pulled from the PR Draft here: https://github.com/libsdl-org/SDL/pull/13565

Co-authored-by: Antheas Kapenekakis <git@antheas.dev>
2025-09-13 07:21:39 -07:00
Sam Lantinga
3ddc3f1146 Send events for mice and keyboards detected during initialization
Fixes https://github.com/libsdl-org/SDL/issues/12815
2025-09-11 20:07:55 -07:00
Sam Lantinga
df0cc6e98b Make sure we always zero the buffer sent to Steam Controllers
This fixes bad initialization for Steam Controllers with the original firmware
2025-09-08 18:41:17 -07:00
Sam Lantinga
25d9096d41 Fixed rumble strength on DualSense Edge and Bluetooth connected controllers
Fixes https://github.com/libsdl-org/SDL/issues/13771
2025-09-06 11:53:32 -07:00
Sam Lantinga
3572be3998 Improved detection of FlyDigi controllers 2025-09-04 18:21:17 -07:00
Sam Lantinga
637a9b34ab Added a comment explaining the initialization delay 2025-09-03 15:47:21 -07:00
Sam Lantinga
b6a55c2856 Wait a bit for initialization to complete before requesting calibration data
Fixes https://github.com/libsdl-org/SDL/issues/13856
2025-09-03 15:36:58 -07:00
Sam Lantinga
84af0bb53a Updated the 8BitDo Ultimate 2 Wireless Controller dongle update rate
The latest dongle firmware appears to update at 1000Hz
2025-09-02 09:53:09 -07:00
Sam Lantinga
a562e40d2c Revert "Disable rumble for the Ultimate 2 Wireless Controller in dongle mode"
This reverts commit 065fdca953.

8BitDo has fixed the rumble issue with dongle firmware update V1.05
2025-09-02 09:53:09 -07:00
Sam Lantinga
1f007ad5cd Added support for the player LED on Nintendo Switch 2 controllers 2025-09-01 21:11:16 -07:00
Sam Lantinga
4b93e7488f Added support for the Switch 2 Joy-Cons with charging grip 2025-09-01 21:11:16 -07:00
Vicki Pfau
184f6fa231 switch2: Read calibration data 2025-08-29 05:46:19 -07:00
Sam Lantinga
ac5ccbe386 Moved Nintendo Switch 2 Controller initialization from hid.c to SDL_hidapi_switch2.c 2025-08-28 09:10:47 -07:00
Sam Lantinga
fb9fcfa37b Fixed controller name when hotplugging the Nintendo Switch 2 Pro Controller 2025-08-28 09:10:47 -07:00
Ethan Lee
a798da2ec7 hidapi: Add support for NSO GameCube controller via libusb.
Thanks to Nohzockt for the initial libusb init and hidapi polling work!
2025-08-28 09:10:47 -07:00
Ethan Lee
efea62ed61 hidapi: Add a stub driver for Switch 2.
Thanks to kiddkaffeine for the Xcode updates!
2025-08-28 09:10:47 -07:00
wankey
6176235a90 fix wrong index in HandleStatePacket with flydigi controller (#13819) 2025-08-28 04:08:54 -07:00
Sam Lantinga
5291e9bbbd Minor cleanup 2025-08-26 19:28:59 -07:00
Sam Lantinga
065fdca953 Disable rumble for the Ultimate 2 Wireless Controller in dongle mode
The dongle appears to stop sending input reports with some combination of rumble patterns, easily reproduced with Forza Horizon 5. We'll disable rumble temporarily until @8BitDo can investigate.
2025-08-26 08:39:00 -07:00
Sam Lantinga
fe16c620d8 Fix crash when enumerating Steam Controllers
Closes https://github.com/libsdl-org/SDL/pull/13746
2025-08-14 14:49:04 -07:00
Sam Lantinga
2d855e12d2 Fixed style 2025-08-14 14:48:58 -07:00
mitchellcairns
e8b5d90c41 SInput: ABXY Style Application and Code Cleanup (#13624)
ABXY Face Style Application

- The abxy face style extraction now applies to any SInput device.
- The use-case here is that gamepads that allow for changing styles can dynamically adjust the button labels firmware-side to have the physical location better represent the actual button being pressed.

SInput Sub-Type Clarification

- The code has been updated to better reflect the intention behind the sub-type field of the GUID byte 15.
- Any SInput device may utilize the Sub-Type field to indicate variants of the same device (Same device that has rear paddles or additional physical features but is otherwise identical, etc.).

"Firebird" Company Name Clarification

- "Bonjiri" was a wrong translation. Got clarification from the company and official PID registration for the official English spelling (See 0c5234cd92).
- Fixed this spelling for all references (official mapping strings still pending and this will return NULL until this is provided).

Code Notes
- Various notes have been updated to have more clear indications.
- I have moved the face-type and sub-type debug messages to be paired with the extraction for easier location.
- I've removed an incorrect note left-over from a previous commit regarding command response information.
2025-08-02 19:11:18 -07:00
Antheas Kapenekakis
2b94062482 sinput: fix compiling with debug output on 2025-08-02 06:37:27 -07:00
Antheas Kapenekakis
d04899fcfd Fix setting RGB without a player led (#13524)
There is a bug where SInput checks for player led capability before
setting RGB. This means that if a controller does not have a player led,
RGB commands are not sent.
2025-08-01 09:15:54 -07:00
mitchellcairns
6d580d74f2 Fix Axis Inputs for Generic SInput Device (#13489)
- Implement correct SInput generic mapping string to map analog axes
- Implement 6 axis count fallback for generic SInput Device
2025-07-31 15:36:10 -07:00