Sam Lantinga
03f29c19dc
Added support for the Dragonrise GameCube adapter with VID 0x1843
...
(cherry picked from commit fbb6934905 )
2023-11-10 16:45:07 -08:00
Sylvain Becker
a14b948b6c
[SDL2] pointer boolean ( #8523 )
2023-11-10 06:30:56 -08:00
Sam Lantinga
171e306dbf
Enable the 5th player LED on the DualSense controller
...
Fixes https://github.com/libsdl-org/SDL/issues/5152
(cherry picked from commit 22016b4eae )
2023-11-06 20:15:39 -08:00
Sam Lantinga
1db0bd3fc0
Added support for the HP HyperX Clutch Gladiate controller
...
(cherry picked from commit f52b330ed8 )
2023-10-25 09:01:46 -07:00
Cameron Gutman
4aab2342e9
Check for device disconnection in HIDAPI_JoystickOpen()
...
HIDAPI joystick drivers may call HIDAPI_JoystickDisconnected() in their
UpdateDevice() function during HIDAPI_JoystickOpen(). If they do this
today, the opened joystick will end up partially initialized (no name,
path, mapping GUID, etc.) because HIDAPI_GetDeviceByIndex() will no
longer be able to find the SDL_HIDAPI_Device for the removed joystick.
Worse still, joystick->hwdata->device becomes a dangling freed pointer
the next time HIDAPI_UpdateDeviceList() is called. This leads to a UAF
when the application or SDL calls SDL_JoystickClose() on this joystick.
Fix all this by checking if the device no longer has any associated
joysticks after calling UpdateDevice() and failing the open call if so.
(cherry picked from commit 435e7ce663 )
2023-10-17 22:18:52 -05:00
Sam Lantinga
37dee79b74
Fixed sensor timestamp units for third-party PS5 controllers
...
(cherry picked from commit a72dfa6a5f )
2023-09-18 13:00:33 -07:00
Sam Lantinga
62e7049a4f
Fixed error: array subscript 2 is above array bounds of ‘const Uint8[2]’
...
Smart compilers don't like dereferencing off the end of arrays
(cherry picked from commit f6756047a4 )
2023-09-18 12:20:22 -07:00
Sam Lantinga
fff3c2573a
Fixed sensor timestamp calculation for third-party PS5 controllers
...
(cherry picked from commit 7059a55ccc )
2023-09-18 11:58:39 -07:00
Sam Lantinga
6ff48dddcb
Fixed the report format for the Razer Wolverine V2 Pro
...
(cherry picked from commit 69aec8c915 )
2023-08-24 11:38:18 -07:00
Sam Lantinga
f7dc8c0eaa
Fixed LED pending check failing when the controller timestamp is very large
...
In this case we know the controller has been on for a while and the Bluetooth connection LED cycle is complete.
Also fixed the timestamp being zero the first time it is checked
(cherry picked from commit bd4f155bbb )
2023-07-17 17:40:17 -07:00
Sam Lantinga
bb036ef544
Don't send k_EPS5FeatureReportIdCapabilities to Sony PS5 controllers
...
This report is for third party controllers only.
(cherry picked from commit 16dd5f0da4 )
2023-07-17 17:39:33 -07:00
Sam Lantinga
910dad505a
Don't tickle Bluetooth PS5 controllers in simple mode with an effects packet
...
That will put the PS5 controller into enhanced mode, which breaks DirectInput games
(cherry picked from commit 2fef0be2f6 )
2023-07-17 17:36:41 -07:00
Sam Lantinga
6bf5f5a221
Don't send k_ePS4FeatureReportIdCapabilities to Sony PS4 controllers
...
This report is for third party controllers only, and might be causing issues with fake PS4 controllers.
Reference https://github.com/libsdl-org/SDL/issues/7960
(cherry picked from commit 092a4b780c )
2023-07-10 09:48:43 -07:00
Sam Lantinga
1f7bc08884
Don't tickle Bluetooth PS4 controllers in simple mode with an effects packet
...
That will put the PS4 controller into enhanced mode, which breaks DirectInput games
(cherry picked from commit efed24850a )
2023-07-08 10:30:31 -07:00
Sam Lantinga
099e53f3a5
Fixed build
2023-06-29 11:25:54 -07:00
Sam Lantinga
0f940cb6ce
Added support for the Nintendo Online Famicom controllers
...
(cherry picked from commit baa9c57581 )
2023-06-29 11:18:09 -07:00
Sam Lantinga
170428b107
Fixed Nintendo Switch Pro controllers that don't have readable user calibration
...
(cherry picked from commit 9ee1200e6f )
2023-06-27 07:50:00 -07:00
Narr the Reg
950ff0056a
hidapi: switch: Handle MCU input reports
...
(cherry picked from commit 425062c123 )
2023-06-26 10:07:15 -07:00
Sam Lantinga
c6660afe44
Corrected the Victrix FS Pro as a PS4 controller instead of a PS3 controller
...
(cherry picked from commit 44bae1e8a9 )
2023-06-23 15:44:15 -07:00
Sam Lantinga
8acf729650
Removed 100 ms hitch when querying third party Nintendo Switch controllers that don't respond to request for info
2023-06-21 14:11:41 -07:00
Sam Lantinga
dfbdaca2b8
Use default sensor calibration if we can't read it from the Nintendo Switch controller
...
Fixes https://github.com/libsdl-org/SDL/issues/7830
(cherry picked from commit 3694dabe7c )
2023-06-21 10:40:02 -07:00
Sam Lantinga
333a03f1ec
We don't know in advance whether a device is connected over Bluetooth in SDL2
2023-06-17 13:15:07 -07:00
Sam Lantinga
5b8fc907df
Added support for the GameSir G4 Pro
...
We can't read device info or IMU calibration from this controller, and it has no gyro or accelerometer, but is otherwise perfectly functional.
(cherry picked from commit f168f9c813 )
2023-06-17 13:07:03 -07:00
Sam Lantinga
3a5abee512
Removed unused function
...
(cherry picked from commit 73927b0948 )
2023-06-14 15:16:44 -07:00
Sam Lantinga
e7ee375f22
Fixed third-party Nintendo Switch Pro controllers shutting down when we try to set the home LED.
...
This fixes the PDP Afterglow Wireless Deluxe Controller.
(cherry picked from commit 0c16f4faf0 )
2023-06-14 15:15:27 -07:00
Sam Lantinga
4aec54988c
Allow switching licensed Nintendo Switch Pro controllers into gyro input mode
...
(cherry picked from commit 8c95bd814b )
2023-06-14 15:13:11 -07:00
Sam Lantinga
271e03f0d7
Added support for the PowerA Fusion Pro Wireless Controller in Bluetooth mode
...
This controller shows up with a VID/PID of 0, but has full functionality over Bluetooth
(cherry picked from commit cdfc0c5a33 )
2023-06-14 15:12:56 -07:00
Sam Lantinga
320f3fffbe
Fixed querying device info on the MOBAPAD M073
...
The query packet needs to contain valid rumble data in order to be accepted by the controller.
Fixes https://github.com/libsdl-org/SDL/issues/7788
(cherry picked from commit 5490873daa )
2023-06-09 18:43:14 -07:00
Sam Lantinga
30b4d90f1c
Only update the serial number if it hasn't already been set
...
This fixes the serial number for Nintendo Switch Pro, which is queried from the hardware in device initialization, and was later clobbered by the USB string which isn't correct.
(cherry picked from commit 2042e9c4e3 )
2023-06-09 17:36:06 -07:00
Sam Lantinga
dc94cca8dd
Fixed typo in cherry-pick (thanks @HadesD!)
2023-06-03 11:57:08 -07:00
Sam Lantinga
97fe777ab4
Steam uses a different VID/PID for the Steam Virtual Gamepad on Windows
...
(cherry picked from commit 6815e75caf )
2023-06-03 11:40:58 -07:00
Sam Lantinga
f1bad83a21
Revert "Fixed detection of the Steam Virtual Gamepad on macOS"
...
This reverts commit 7aa28ce279 .
Steam has been updated to send a version of 1 to avoid conflicts with controllers that report a version of 0.
2023-06-03 11:36:38 -07:00
Sam Lantinga
7aa28ce279
Fixed detection of the Steam Virtual Gamepad on macOS
...
(cherry picked from commit 5fcd70578b )
2023-06-02 18:39:22 -07:00
Sam Lantinga
3f1fd5abff
Updated source to match SDL function prototype style
2023-05-23 10:59:03 -07:00
Sam Lantinga
e8ec8ba1d4
Added support for the Astro C40 in Xbox 360 mode
...
(cherry picked from commit a4b4dff4a2 )
2023-05-19 14:23:57 -07:00
Sam Lantinga
120bc77e91
Report PS3 accelerometer values in m/s2 instead of Gs
...
(cherry picked from commit 0467301baf )
2023-04-19 13:12:38 -07:00
Sam Lantinga
7ec9a4385a
More defensive coding against dangling device pointers
...
(cherry picked from commit acadb6f873 )
2023-04-06 13:21:44 -07:00
Sam Lantinga
cb0cf14155
The latest Armor-X Pro firmware update fixes the sign on the Z axis of the sensors
...
(cherry picked from commit 558bbbb07a )
2023-04-06 09:55:39 -07:00
Sam Lantinga
f6363fde9a
Fixed crash if joystick->hwdata != NULL && device->driver == NULL
...
This should never happen, but we're seeing it in the wild, so make sure that we can never call into a NULL device driver.
(cherry picked from commit e13b74ccf0 )
2023-04-05 11:24:55 -07:00
Ozkan Sezer
f633915443
fix build after commit 22685556e5.
2023-04-05 02:10:56 +03:00
Sam Lantinga
22685556e5
Don't probe for PlayStation controllers when we already know the controller type
...
Fixes https://github.com/libsdl-org/SDL/issues/7556
(cherry picked from commit 655a07bdd8 )
2023-04-04 12:35:20 -07:00
Sam Lantinga
f444eac557
Fixed analog triggers on the DualSense controller
...
(cherry picked from commit a67d410501 )
2023-04-04 12:35:20 -07:00
Sam Lantinga
0bf63175ab
Fixed gyro values for the Armor-X Pro controller
...
(cherry picked from commit 8df7b4d853 )
2023-03-28 14:44:59 -07:00
Sam Lantinga
d043c8535b
Fixed the accelerometer and gyro axes for the Armor-X Pro controller
...
(cherry picked from commit 37517557ae )
2023-03-28 12:29:33 -07:00
Sam Lantinga
8bfbda1eab
Fixed the accelerometer sensitivity for the Armor-X Pro controller
...
(cherry picked from commit 8029a767ee )
2023-03-27 14:33:59 -07:00
Sam Lantinga
93c289b475
Increased precision for PS4 sensor data conversion
...
(cherry picked from commit 3340864786 )
2023-03-27 14:33:56 -07:00
Pierre Wendling
ed5a343d25
SDL_hidapi_steam.c: Fix compilation under c2x.
...
When N2935 is implemented, the enum breaks compilation. Use a #define of
the SDL booleans instead.
(cherry picked from commit 975039ce0d )
2023-03-27 09:02:46 -07:00
Sam Lantinga
57ae9f466d
Ignore the PS4 packet CRC if it's not being set correctly
...
This fixes handling the 8BitDo SN30 Pro with the 2.00 firmware in PS4 mode
Fixes https://github.com/libsdl-org/SDL/issues/7270
(cherry picked from commit 3951cae4a5 )
2023-03-13 20:00:19 -07:00
Sam Lantinga
ab1670386f
Added support for the trigger buttons on the Victrix Pro FS for PS5
...
(cherry picked from commit 8d7e61ea42364c256b76e7f6f2b6d6f90742bcb7)
2023-03-10 15:46:22 -08:00
Sam Lantinga
1e6ffc6294
Removed a duplicate delay accidentally added during code refactor
...
(cherry picked from commit 926db1bd54 )
2023-03-09 16:13:19 -08:00