mitchellcairns
caecff650d
Resolve bug for calibration Nintendo Switch Pro Controller ( #13260 )
...
Resolves a bug which prevents the stored calibration data from loading, only allowing loading of factory-installed calibration data
(cherry picked from commit 796961acec )
2025-06-22 21:00:01 -07:00
Mitch Cairns
f6300be4b2
Fixed Nintendo Switch thumbstick calibration
...
(cherry picked from commit 3a6f9e01f8 )
2025-06-22 15:27:30 -07:00
Sam Lantinga
bde5687a3c
Fixed Nintendo Switch Pro thumbstick calibration
...
Fixes https://github.com/libsdl-org/SDL/issues/13246
(cherry picked from commit 038a3806eb )
2025-06-21 19:57:04 -07:00
ceski
a96dc76831
Read Switch controller gyro/accel sensitivity coeffs (SDL3)
...
These vary by controller, so using the stored values should improve the accuracy of the sensor data.
(cherry picked from commit 558a89fdb6 )
2025-06-13 12:18:43 -07:00
Sam Lantinga
af83c442d3
Fixed input from the MayFlash GameCube adapter with version 7 firmware
...
(cherry picked from commit 7457857304 )
2025-06-03 11:14:09 -07:00
Sam Lantinga
26a1aae098
Fixed the Bluetooth flag for the combined Joy-Con controller
...
(cherry picked from commit 264eb8d440 )
2025-05-21 13:30:30 -07:00
Joe [ReRezd]
49e9134774
Fix: GameCube controller adapter hotplug not working
...
SDL_PrivateJoystickAdded was called before setting the InstanceId in the adapters ctx->joysticks array. This would eventually broadcast the SDL_EVENT_JOYSTICK_ADDED event with the new InstanceId, if your program listens for the added events and opens joysticks at that point it would always fail because there would be no matching InstanceId in the ctx->joysticks array.
(cherry picked from commit afd1e51023 )
2025-05-19 08:25:16 -07:00
Sam Lantinga
3f13c0b36d
Fixed crash if info->path is NULL
...
(cherry picked from commit 715301cef5 )
2025-03-17 09:46:57 -07:00
Sam Lantinga
5c0c5d2816
Fixed crash unplugging a HIDAPI controller
...
(cherry picked from commit 5f07347e4f )
2025-03-04 11:42:37 -08:00
Sam Lantinga
eb89d0c8c3
Don't put wired Switch Pro controllers into simple report mode
...
This stops the controller from sending input or responding to queries until it's unplugged.
2025-02-26 17:54:43 -08:00
Sam Lantinga
ba88b6aa06
Fixed reliability of initializing Switch controllers on macOS
...
It looks like both macOS (15.1.1) and SDL are trying to talk to the controller at the same time, which can cause interleaved replies or even locking up the controller. Waiting a bit before talking to the controller seems to take care of this.
2025-02-26 12:24:47 -08:00
Sam Lantinga
66ecdc69ac
Don't update the report mode until the related hint is set
...
Fixes https://github.com/libsdl-org/SDL/issues/12404
2025-02-26 12:24:47 -08:00
Sam Lantinga
34c3734953
Fixed opening one Joy-Con when the other is visible but disconnected
...
This can happen on Windows when the controller is turned off directly. It still shows up in the device list and you can send packets to it, but it's off and doesn't respond. We'll mark this device as broken and open the other as a single Joy-Con.
2025-02-25 19:14:18 -08:00
Cameron Gutman
4a9b579195
joystick: remove dead udev code
...
SDL_USE_LIBUDEV is never even defined here and SDL_hid_init() already does this.
2025-02-15 14:17:13 -06:00
Stenzek
78721d720c
joystick: Fix PS5 player LED hint change callback name
...
The LED hint was getting registered for SDL_HINT_JOYSTICK_ENHANCED_REPORTS
instead of SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, which results in a
use-after-free followed by a crash.
2025-02-10 07:36:07 -08:00
Sam Lantinga
6782cfe2c5
Don't use the HIDAPI driver for Thrustmaster wheels
...
Closes https://github.com/libsdl-org/SDL/pull/12173
2025-02-05 17:19:59 -08:00
Petar Popovic
a336b62d8b
Remove newlines from error messages
2025-01-23 11:45:04 -08:00
Petar Popovic
983cfe8b1c
Remove even more newlines from log messages
2025-01-23 09:32:50 -08:00
nightmareci
718034f5fa
Remove newlines from log messages
2025-01-22 20:25:04 -08:00
Sam Lantinga
49dd24e195
Fixed potentially overlapping memcpy() to use memmove()
2025-01-14 14:31:20 -08:00
Sam Lantinga
21cc1878f1
Reset enhanced mode state when closing a controller
...
Fixes https://github.com/libsdl-org/SDL/issues/11912
2025-01-12 10:45:54 -08:00
Sam Lantinga
2c0a8363a5
Added SDL_HINT_JOYSTICK_ENHANCED_REPORTS
...
This hint defaults on, enabling advanced controller features.
This replaces SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE and SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, and is supported by PlayStation and Nintendo Switch controllers.
Fixes https://github.com/libsdl-org/SDL/issues/10086
2025-01-02 17:18:09 -08:00
Sam Lantinga
f2074d7af3
Updated copyright for 2025
2025-01-01 07:45:52 -08:00
Sam Lantinga
9a4d29699d
Don't use connection state from the Nintendo Switch Pro report
...
This isn't reliable for third party controllers like the 8BitDo Pro 2.
Fixes https://github.com/libsdl-org/SDL/issues/10862
2024-12-27 13:58:49 -08:00
Sam Lantinga
22f6eed1d9
Use the NVIDIA Shield home button as the guide button
2024-12-27 12:42:06 -08:00
Sam Lantinga
37b87f79fb
Fixed Bluetooth Steam Controller detection on iOS and Android
2024-12-23 12:55:25 -08:00
Sam Lantinga
235e5c6a6c
Fixed crash if a device doesn't have a USB product or manufacturer string
...
This happens with the Razer Huntsman V3 Pro Tenkeyless keyboard
2024-12-05 10:42:02 -08:00
Sam Lantinga
7a074f582e
Steam Controller handling improvements
...
* Only handle the controller interfaces on a Steam Controller and wireless dongle
* Wait until we get the connected status when initializing a wireless dongle
2024-11-18 21:36:23 -08:00
Sam Lantinga
0c53d9a1ee
Implemented SendEffect for Steam Controllers
2024-11-18 18:26:07 -08:00
Sam Lantinga
d8f8cf3e99
Added SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED
2024-11-18 14:50:37 -08:00
Sam Lantinga
184da780f5
Fixed a crash when unplugging a Steam Controller dongle
2024-11-18 12:13:42 -08:00
Sam Lantinga
af6ce629c4
Make sure pairing remains enabled for the entire time dongle pairing is active
2024-11-16 13:42:12 -08:00
Sam Lantinga
2b10a040ff
Fixed rare case of wireless Steam Controller not being detected at startup
2024-11-16 13:10:02 -08:00
Cameron Gutman
e0166256ff
joystick: Fix connection type for Steam Controller and Xbox 360 dongles
2024-11-15 17:54:14 -06:00
Sam Lantinga
8657fa8b3b
Improved reliability of the Steam Controller driver
2024-11-15 15:55:13 -08:00
Sam Lantinga
b71151a697
Added support for pairing controllers to the Steam Controller dongle
2024-11-14 20:04:31 -08:00
Sam Lantinga
f0b61c69e7
Fixed duplicate controllers showing up on the Steam Controller wireless dongle
2024-11-14 14:19:16 -08:00
Sam Lantinga
0f9505256d
Steam Controller support defaults off on mobile platforms
...
These platforms require prompting for Bluetooth permissions, so don't enable this by default.
2024-11-14 09:05:16 -08:00
Sam Lantinga
140aba9e5d
Enable Steam Controller support by default
...
It now handles both wired and wireless controllers and Steam will set SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES for Steam Controllers if it's handling them.
2024-11-14 08:18:03 -08:00
Cameron Gutman
68c2cf84f6
hidapi: Add support for the Steam Controller wireless dongle
2024-11-14 06:57:22 -08:00
Cameron Gutman
1a311bc638
hidapi: Add support for Steam controllers connected via USB
2024-11-14 06:57:22 -08:00
Sam Lantinga
27b828754a
Use HIDAPI to provide better names for DirectInput controllers
...
Fixes https://github.com/libsdl-org/SDL/issues/10207
2024-11-05 11:43:28 -08:00
Sam Lantinga
c5f12b135d
Fixed the D-pad on wireless Xbox 360 controllers
2024-11-01 09:02:55 -07:00
Sam Lantinga
8b48b70c6e
Fixed return value setting state on combined Joy-Con controllers
2024-10-31 20:37:23 -07:00
Sam Lantinga
41366f73b2
Don't block in Android USB device open
...
We might be waiting a long time for a permissions dialog, so let that complete asynchronously. While that's happening, we'll remove the device from the device list so that when we get permission the application sees the device as newly available and can open it again.
Fixes https://github.com/libsdl-org/SDL/issues/6347
2024-10-17 12:02:24 -07:00
Sam Lantinga
be3d961b47
Treat clicking the right pad as a thumbstick click on a Steam Controller
2024-10-17 12:02:24 -07:00
Sam Lantinga
c41b2bb855
SDL_ShouldIgnoreGamepad() should take product IDs rather than a guid.
...
This lets us early out when scanning for new hardware more quickly.
2024-10-16 16:47:29 -07:00
Sam Lantinga
d6981da5a4
Added SDL_GetSandbox()
...
This adds support for detecting whether you're running in a sandbox on macOS
2024-10-16 16:47:29 -07:00
Sam Lantinga
d7b1ba1bfc
Added support for the Steam Virtual Gamepad on macOS Sequoia
2024-10-16 16:47:29 -07:00
Sam Lantinga
7da728a642
Added support for wired XBox controllers on macOS 15.0 Sequoia
...
Fixes https://github.com/libsdl-org/SDL/issues/11002
2024-10-07 15:44:42 -07:00