Commit Graph

590 Commits

Author SHA1 Message Date
Sam Lantinga
acadb6f873 More defensive coding against dangling device pointers 2023-04-06 11:33:27 -07:00
Sam Lantinga
558bbbb07a The latest Armor-X Pro firmware update fixes the sign on the Z axis of the sensors 2023-04-06 09:55:01 -07:00
Sam Lantinga
e13b74ccf0 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.
2023-04-05 11:24:27 -07:00
Anonymous Maarten
b6ae281e97 Use #ifdef/#ifndef instead of #if defined/#if \!defined 2023-03-30 21:35:01 +00:00
Sam Lantinga
308bcbbe76 Fixed Visual Studio warning 4244 2023-03-30 14:04:32 -07:00
Sam Lantinga
85ee1498a5 Fixed Visual Studio warning 4245 2023-03-30 14:02:06 -07:00
Sam Lantinga
655a07bdd8 Don't probe for PlayStation controllers when we already know the controller type
Fixes https://github.com/libsdl-org/SDL/issues/7556
2023-03-30 07:36:40 -07:00
Sam Lantinga
a67d410501 Fixed analog triggers on the DualSense controller 2023-03-30 07:25:49 -07:00
Sam Lantinga
8df7b4d853 Fixed gyro values for the Armor-X Pro controller 2023-03-28 14:44:28 -07:00
Sam Lantinga
37517557ae Fixed the accelerometer and gyro axes for the Armor-X Pro controller 2023-03-28 12:28:15 -07:00
Sam Lantinga
8029a767ee Fixed the accelerometer sensitivity for the Armor-X Pro controller 2023-03-27 14:27:22 -07:00
Sam Lantinga
3340864786 Increased precision for PS4 sensor data conversion 2023-03-27 14:21:05 -07:00
Pierre Wendling
975039ce0d SDL_hidapi_steam.c: Fix compilation under c2x.
When N2935 is implemented, the enum breaks compilation. Use a #define of
the SDL booleans instead.
2023-03-27 09:02:14 -07:00
Sam Lantinga
3951cae4a5 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
2023-03-13 19:58:35 -07:00
Sam Lantinga
fc1af1dfde Added support for the trigger buttons on the Victrix Pro FS for PS5 2023-03-10 15:40:09 -08:00
Sam Lantinga
926db1bd54 Removed a duplicate delay accidentally added during code refactor 2023-03-09 16:12:49 -08:00
Sam Lantinga
c6443d86c9 Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!) 2023-03-09 15:10:44 -08:00
David Demelier
d0c4849d0b Rename SDL_atomic_t to SDL_AtomicInt 2023-03-09 09:00:09 -08:00
Sam Lantinga
ba87b96cea Fixed signed/unsigned warnings
Fixes https://github.com/libsdl-org/SDL/issues/7424
2023-03-08 12:36:44 -08:00
Sylvain
c963f02571 More fix warnings about static function and prototype 2023-03-08 16:14:09 +01:00
Sam Lantinga
da134a3039 Fixed locking up the Logitech F310 with the PlayStation controller detection 2023-02-28 08:36:31 -08:00
Sam Lantinga
4aeec9d8c2 Rumbling the Google Stadia Controller over Bluetooth works on Linux and macOS 2023-02-21 15:05:57 -08:00
Sam Lantinga
021a7cfa13 Fixed the packet size for Xbox One controllers 2023-02-21 12:47:48 -08:00
Sam Lantinga
1a15d506a6 Removed duplicated conditional 2023-02-20 18:24:52 -08:00
Sam Lantinga
02cea5fca1 Fixed rumble caps for the Nintendo Joy-Con controllers 2023-02-20 17:14:18 -08:00
Sam Lantinga
4994654d4f Added support for the Razer Wolverine V2 controllers 2023-02-20 15:14:20 -08:00
Sam Lantinga
ece8a7bb8e Hold the joystick lock while opening the HID device on non-Android platforms
On Windows the main thread can be enumerating DirectInput devices while the Windows.Gaming.Input thread is calling back with a new controller available, and in this case HIDAPI_IsDevicePresent() returned false since the controller initialization hadn't completed yet, creating a duplicate controller.

Fixes https://github.com/libsdl-org/SDL/issues/7304
2023-02-16 09:50:04 -08:00
Sam Lantinga
5925cd4ef3 Fixed handling simple mode PS4 reports
Fixes https://github.com/libsdl-org/SDL/issues/7270
2023-02-14 17:51:16 -08:00
Sam Lantinga
e4face7c1d Fixed the share button on the ThrustMaster eSwap PRO Controller Xbox 2023-02-10 16:46:21 -08:00
Sam Lantinga
b7c6fec10a Make sure we synchronously re-enable USB reporting mode for Switch controllers (thanks @SortaCore!)
Fixes https://github.com/libsdl-org/SDL/issues/3450
2023-02-08 14:22:39 -08:00
Sam Lantinga
50575ed223 Note the Google Stadia controller doesn't support rumble over Bluetooth 2023-02-08 14:16:24 -08:00
Sam Lantinga
00e02de77b Fixed mis-detecting the share button on the Xbox controller over NDIS 2023-02-08 14:16:21 -08:00
Sam Lantinga
d1c72bb0bc Dynamically update the serial number if it isn't available at first
This happens for Xbox One controllers using newer firmware connected over NDIS
2023-02-08 14:16:17 -08:00
Sam Lantinga
5fded632d6 Added support for the Turtle Beach REACT-R and Recon Xbox controllers 2023-02-06 20:14:12 -08:00
Sam Lantinga
0208a0eeb3 Added support for the Logitech ChillStream 2023-02-06 13:28:59 -08:00
Sam Lantinga
22bafe8729 Removed debug code accidentally committed 2023-02-06 11:23:53 -08:00
Sam Lantinga
f8b41919da Fixed warning running a command queue without any vertex operations 2023-02-06 11:22:00 -08:00
Sylvain Becker
cb6b8b0132 Simplify flags testing (#7220) 2023-02-03 13:08:42 -08:00
Sam Lantinga
c4db0725e4 Enable paddles on the Xbox Elite controller when connected over USB 2023-01-20 09:31:22 -08:00
Narr the Reg
9fa55d9cab hidapi: switch: Add user calibration support 2023-01-09 18:07:54 -08:00
Sam Lantinga
fde78d12f2 Updated copyright for 2023 2023-01-09 09:41:41 -08:00
Sam Lantinga
aaaf7423ac Fixed build 2023-01-03 16:17:10 -08:00
Sam Lantinga
32c077216c Fixed warnings 2023-01-03 15:59:35 -08:00
Sam Lantinga
49af0d1b89 Fixed build 2023-01-03 15:35:18 -08:00
Sam Lantinga
e85839cd56 Fixed line wrapping for HID packet dump 2023-01-03 15:12:47 -08:00
Sam Lantinga
dacdb1c310 Added support for the ThrustMaster eSwap PRO Controller Xbox 2023-01-03 15:12:18 -08:00
Sylvain Becker
d7d3c22dbf Remove more reserved identifiers (#6925) 2022-12-29 13:58:16 -08:00
Sam Lantinga
16092f58bb Updated gamepad, joystick, sensor APIs, removing device indices
Instead of indexing into an internal list of devices which requires locking, we return a list of device IDs which can then be queried individually.

Reference: https://github.com/libsdl-org/SDL/issues/6889
2022-12-28 13:10:27 -08:00
Sam Lantinga
36d4395c97 SDL API renaming: internal functions 2022-12-27 15:05:51 -08:00
Sam Lantinga
ab2d007982 More gamepad renaming 2022-12-27 11:31:54 -08:00