Commit Graph

2542 Commits

Author SHA1 Message Date
Steel
0bf2065922 Add support for PXN VD6 Wheelbase
(cherry picked from commit 32cf5fe93d)
2026-03-16 10:51:30 -07:00
Rachel Blackman
8ba903c859 Add second-gen Backbone One to recognized controllers.
(cherry picked from commit ba00e772a7)
2026-03-13 15:40:29 -07:00
Sam Lantinga
6248eeec09 Disable system gesture state for all GCControllers
Technically we only want to do this for controllers that are opened, but we don't have a way to match up controllers using other APIs with individual GCControllers.

(cherry picked from commit 11adfd2008)
2026-03-12 08:43:19 -07:00
Nintorch
ffd2696516 Fallback for non-gamepad controllers in GameInput
This PR makes the GameInput joystick backend ignore non-gamepad controllers if DirectInput or XInput backends are enabled. This is done to prevent possible bugs and/or regressions.

(cherry picked from commit 419dcfe747)
2026-03-10 11:06:37 -07:00
Nintorch
66020c2ed7 Small GameInput joystick backend improvements
This PR includes small improvements to the GameInput joystick backend:
- Device subtypes
- Compatibility with DirectInput joystick mappings (if the controller is not a gamepad, i.e. `GAMEINPUT_InternalIsGamepad()` returns `false`)
- Fallback to DirectInput/XInput for currently unsupported devices (force feedback ones and the ones that are neither gamepads nor controllers, I'm not sure if that's possible, but maybe racing wheels and other device subtypes would count?)

(cherry picked from commit 0138843eb7)
2026-03-09 11:12:30 -07:00
Sanjay Govind
36ed4b75d1 support batteries on 3rd party controllers
(cherry picked from commit e610b85d1c)
2026-03-08 11:40:56 -07:00
Sanjay Govind
b08f7924a4 Add support for whammy and tilt on PS4/5 guitars
PS4/5 controllers put device specific data into a specific region in the report, so we have to extract it separately.

No known guitars use the right stick on the guitar, so to keep things working similarly to PS3, i have opted to map whammy and tilt the same way as the PS3 rb guitars.

(cherry picked from commit 94f17d6c61)
2026-03-08 11:36:17 -07:00
Sanjay Govind
1ee158cd31 fix off by one with tilt on ps3 guitars (#15144)
(cherry picked from commit 34378609bb)
2026-03-02 09:45:54 -08:00
zuiki_inn
6d93ffe923 Add ZUIKI EVOTOP controller support with gyroscope and accelerometer sensor capabilities. (#15034)
(cherry picked from commit 29ca920fdf)
2026-02-25 20:24:50 -08:00
Sam Lantinga
aa9de89232 Added battery status for newer FlyDigi controllers
(cherry picked from commit 49a8b4229b)
2026-02-24 20:50:11 -08:00
Sanjay Govind
645b8e7f6d Support accelerometers on 3rd party ps3 controllers (#15109)
(cherry picked from commit 0c859452ef)
2026-02-24 19:00:11 -08:00
Sanjay Govind
17532fd62e Set joystick_type for known ps3/wii instruments (#15111)
(cherry picked from commit a7ccd48957)
2026-02-24 17:30:07 -08:00
Sanjay Govind
2214522b69 deal with controllers that don't have report ids
(cherry picked from commit 1419bcb6cb)
2026-02-24 15:19:49 -08:00
Sanjay Govind
b3adee0720 Fix up controller types for various playstation and wii instruments (#15104)
(cherry picked from commit 0e4008441f)
2026-02-24 13:36:08 -08:00
Sam Lantinga
00c85a0b9e Added support for the Flydigi Vader 5 Pro in Xbox 360 mode
(cherry picked from commit 2385dc6297)
2026-02-24 10:20:29 -08:00
Vicki Pfau
399b2b18ce Support SL/SR on Switch 2 controllers, but only in mini-controller mode
It doesn't really make sense to support these in combined mode since they're usually occluded.

(cherry picked from commit 8a1684fbbc)
2026-02-24 06:53:41 -08:00
Ryan C. Gordon
7cc9955ae1 emscripten: Move some EM_ASM blocks to MAIN_THREAD_EM_ASM.
These blocks reference the `navigator` global, which is not available in
background threads.

(cherry picked from commit c728e2f044)
2026-02-20 10:28:12 -05:00
Sam Lantinga
3b4cf41c92 Fixed HIDAPI PS5 Bluetooth report format
(cherry picked from commit 129627068f)
2026-02-17 08:57:28 -08:00
Sam Lantinga
9f0ebbef46 Steam Controller report 0x45 is used for BLE mode
(cherry picked from commit 0b1c592fda)
2026-02-12 15:46:19 -08:00
Sam Lantinga
6707df6d88 Updated Steam Controller packet handling
(cherry picked from commit 84c21cf970)
2026-02-12 14:34:52 -08:00
Sam Lantinga
b467276f4a Fixed initializing the PowerA Fusion Pro 4 on Steam Link hardware
(cherry picked from commit 2b484a1ccb)
2026-02-11 16:54:42 -08:00
Sam Lantinga
17eb20505c Fix the 8BitDo Ultimate 2D Wireless Controller showing up multiple times
This controller has 3 interfaces, one for the Xbox gamepad protocol, and two HID interfaces. We should only handle the Xbox interface in the Xbox driver.

(cherry picked from commit 9f8c70713a)
2026-02-09 13:29:47 -08:00
Vicki Pfau
2b72332b81 Fix Switch and Switch 2 player LED patterns
The patterns we were using don't match the official patterns, which fill up as
many lights as players instead of just using the nth player LED. Above 4,
there are some special patterns, as documented on Nintendo's Singaporean site:
https://www.nintendo.com/sg/support/qa/detail/33822

(cherry picked from commit 017d950b6b)
2026-02-07 07:37:51 -08:00
Vicki Pfau
45086459d2 Add and use libusb_set_auto_detach_kernel_driver for the Switch 2 driver
(cherry picked from commit e1b8ad0380)
2026-02-05 14:59:10 -08:00
Sam Lantinga
38b9c9117d Fixed warning: no previous prototype for function 'SDL_PrivateIsGamepadPlatformMatch'
(cherry picked from commit cd14bf3d00)
2026-02-04 14:41:27 -08:00
Nintorch
94f6f8d3c3 Add share button mapping to Xbox Series X controller on Android
(cherry picked from commit 997a168e00)
2026-02-03 11:33:44 -08:00
Sam Lantinga
a2653b857c Fixed the GameCube Controller Adapter showing up twice on macOS
(cherry picked from commit b5206909a7)
2026-02-02 15:56:06 -08:00
Sam Lantinga
00fc74e6af Fixed handling GameCube adapters in PC mode on Linux and macOS
On Windows there is a separate HIDAPI device for each slot. On Linux and macOS, there is a single HIDAPI device and the slot is included in the report.

(cherry picked from commit cdffbdfeaf)
2026-02-02 15:56:05 -08:00
Cameron Gutman
3cf15dc222 gamepad: Accept older 'Mac OS X' mappings on macOS
(cherry picked from commit e3c9ec7b67)
2026-01-30 18:12:54 -06:00
Henrique Jorge Barateli
38b5ad824d Fixed PS2 joystick analog sticks not enabled
(cherry picked from commit 8fa8c331a5)
2026-01-30 12:17:39 -08:00
Eddy Jansson
ff2a43bfbf Fix typos in comments.
(cherry picked from commit 23fec649c2)
2026-01-30 07:25:35 -08:00
Sam Lantinga
1ec73bac92 Fixed typo
(cherry picked from commit 58c30a4451)
2026-01-28 13:43:40 -08:00
Sam Lantinga
e1294f3b48 Fixed the 8BitDo Ultimate 2 Wireless for PC controller showing up twice on macOS
(cherry picked from commit 0f10f81b3b)
2026-01-28 13:39:37 -08:00
Sam Lantinga
3bde3e2406 Fixed the 8BitDo Ultimate 2 Wireless controller showing up twice on macOS
Fixes https://github.com/libsdl-org/SDL/issues/14902

(cherry picked from commit 3aa3a357fc)
2026-01-27 14:41:36 -08:00
Sam Lantinga
5c002ba0b9 Fixed the NVIDIA SHIELD Controller showing up twice on macOS
Fixes https://github.com/libsdl-org/SDL/issues/14911

(cherry picked from commit 1fe6bf4982)
2026-01-27 13:53:06 -08:00
Sam Lantinga
05fdfa1572 Fixed hang sending output reports to the NVIDIA SHIELD Controller on macOS
(cherry picked from commit 72343b9ee2)
2026-01-27 13:53:06 -08:00
Sam Lantinga
d4da5df088 Fixed unaligned access in NVIDIA SHIELD Controller driver
Also refactored the LOAD16() and LOAD32() macros into SDL_hidapijoystick_c.h

(cherry picked from commit cae2a28f5b)
2026-01-27 13:53:06 -08:00
Sam Lantinga
6fef8fd0dc Fixed Steam Controller battery state
(cherry picked from commit dd53ecbce8)
2026-01-27 09:53:17 -08:00
Nintorch
13f8201dbe Add support for joystick LED for Switch controllers
Co-Authored-By: Thiago Lelles Fernandes <125714191+thilelito@users.noreply.github.com>
(cherry picked from commit 90dabda3b4)
2026-01-27 09:46:00 -08:00
Eddy Jansson
26352be1e5 More prefer SDL_zero*()
Transform clearing of arrays into SDL_zeroa(), and
clearing through a T* with size(T) into SDL_zerop().

Extends commit 83fb7b6636.

(cherry picked from commit 248223592a)
2026-01-23 16:02:27 -08:00
Eddy Jansson
1d6d424775 Prefer SDL_zero()/SDL_zerop()
Replace uses of 'SDL_memset(E, 0, sizeof(E))' and similar
with the SDL_zero()/SDL_zerop() macros.

(cherry picked from commit 83fb7b6636)
2026-01-23 11:23:55 -08:00
Sam Lantinga
895bdc4f21 Fixed divide by zero handling Nintendo Switch 2 controller
(cherry picked from commit b1362f8a42)
2026-01-20 11:04:44 -08:00
Aubrey Hesselgren
9e5975f332 Fix Horipad bluetooth gyro stutter issues using simulated sensor timing approach (based on packet rate observation)
By observation: wired is 250hz/4000ms, and bluetooth is 120hz/8333ms for IMU sensor.

(cherry picked from commit 5c15d74394)
2026-01-19 15:26:03 -08:00
Sam Lantinga
d264c27468 Added support for the Razer Raiju V5 Pro in wireless mode
(cherry picked from commit 54fdeb9e79)
2026-01-13 16:24:56 -08:00
Sam Lantinga
92d6308aac Added support for the Razer Raiju V5 Pro
(cherry picked from commit 015d0fc2e4)
2026-01-13 15:48:35 -08:00
Frank Praznik
75ff70b489 joystick/win32: Fix function return type mismatch
Fixes #14804

(cherry picked from commit 55acc0b829)
2026-01-11 10:57:24 -05:00
Sam Lantinga
cc0755881c Fixed crash when the broken EZFRD64.DLL is present
Fixes https://github.com/ppy/osu/issues/13634

(cherry picked from commit f369e804e2)
2026-01-07 20:32:07 -08:00
Katharine Chui
fa894b07be hidapi: Disable hidapi LG4FF on windows (#14762)
hid.dll simply cannot send 7 bytes reports unlike other platforms

It enforces full length repots of 17 from the device's descriptor,
which does not work on the device.

This breaks ffb and led control, so we disable this by default on
windows.

(cherry picked from commit 6c2f9bc41e)
2026-01-05 08:14:45 -08:00
Sam Lantinga
3f58b99b53 Fixed handling status changes in the FlyDigi controller driver
(cherry picked from commit ce6a6d1b39)
2026-01-05 08:00:13 -08:00
Sam Lantinga
80c6a5f8d9 Updated copyright for 2026 2026-01-01 09:48:19 -08:00