Sam Lantinga
49b9fd1843
Don't send k_ePS4FeatureReportIdSerialNumber to Bluetooth PS4 controllers
...
This isn't supported over Bluetooth and might be causing issues with fake PS4 controllers.
Note that this change should NOT be ported to SDL2, as device->is_bluetooth is not set from hidapi there and is only detected by seeing which reports are valid.
Reference https://github.com/libsdl-org/SDL/issues/7960
2023-07-10 09:37:20 -07:00
Sam Lantinga
092a4b780c
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
2023-07-10 09:37:20 -07:00
Sam Lantinga
efed24850a
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
2023-07-07 15:56:54 -07:00
luzpaz
37e567994d
Fix remaining typos ( #7921 )
...
* Fix remaining typos
Found via `codespell -q 3 -S *.hex,*.pdf,./src/libm,./src/hidapi,./src/stdlib/SDL_malloc.c,./src/video/x11/edid.h -L caf,currenty,datas,einstance,fo,hda,lod,mata,parm,parms,pevent,pevents,pixelx,requestor,ser,statics,te,texturers,thid,uscaled,windowz`
2023-07-03 12:46:47 -07:00
Sam Lantinga
69c7a49990
Fixed build warnings
2023-06-29 22:15:23 -07:00
Sam Lantinga
baa9c57581
Added support for the Nintendo Online Famicom controllers
2023-06-28 19:15:43 -07:00
Sam Lantinga
9ee1200e6f
Fixed Nintendo Switch Pro controllers that don't have readable user calibration
2023-06-27 07:48:42 -07:00
Narr the Reg
425062c123
hidapi: switch: Handle MCU input reports
2023-06-26 10:01:49 -07:00
Sam Lantinga
267fdd7daa
Removed Bluetooth connection detection now that we get it from hidapi
2023-06-23 15:50:07 -07:00
Sam Lantinga
44bae1e8a9
Corrected the Victrix FS Pro as a PS4 controller instead of a PS3 controller
2023-06-23 14:27:21 -07:00
Sam Lantinga
a807b14957
Greatly improved Xbox One controller initialization sequence
2023-06-22 17:15:35 -07:00
Sam Lantinga
214d5daa3c
Removed 100 ms hitch when querying third party Nintendo Switch controllers that don't respond to request for info
...
Also take advantage of the fact that we know whether the device is connected over Bluetooth now.
2023-06-21 12:14:50 -07:00
Sam Lantinga
3694dabe7c
Use default sensor calibration if we can't read it from the Nintendo Switch controller
...
Fixes https://github.com/libsdl-org/SDL/issues/7830
2023-06-21 10:28:45 -07:00
Sam Lantinga
f168f9c813
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.
2023-06-17 12:42:55 -07:00
Sam Lantinga
73927b0948
Removed unused function
2023-06-14 15:16:21 -07:00
Sam Lantinga
0c16f4faf0
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.
2023-06-14 10:15:06 -07:00
Sam Lantinga
23e007d3b7
Fixed third party Nintendo Switch Pro Controller resetting when being sent an unsupported command to set the Home LED
...
Tested with the PowerA Fusion Pro Wireless Controller in Bluetooth mode
2023-06-14 00:02:32 -07:00
Sam Lantinga
8c95bd814b
Allow switching licensed Nintendo Switch Pro controllers into gyro input mode
2023-06-13 22:40:51 -07:00
Sam Lantinga
cdfc0c5a33
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
2023-06-13 22:20:58 -07:00
Sam Lantinga
5490873daa
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
2023-06-09 18:41:21 -07:00
Sam Lantinga
2042e9c4e3
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.
2023-06-09 17:34:12 -07:00
Sam Lantinga
32d015a6a0
Fixed PS3 controller initialization over Bluetooth
...
Now that we have hidapi that knows whether the controller is connected via Bluetooth or USB, this is much easier to fix.
2023-06-08 10:46:56 -07:00
Sam Lantinga
dc06116c71
Steam sets the device version of the Steam Virtual Gamepad to 0, for the best compatibility with old games
2023-06-06 12:33:48 -07:00
Sam Lantinga
6815e75caf
Steam uses a different VID/PID for the Steam Virtual Gamepad on Windows
2023-06-03 11:39:03 -07:00
Sam Lantinga
5f00147e61
Revert "Fixed detection of the Steam Virtual Gamepad on macOS"
...
This reverts commit 5fcd70578b .
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:35:27 -07:00
Sam Lantinga
5fcd70578b
Fixed detection of the Steam Virtual Gamepad on macOS
2023-06-02 18:37:45 -07:00
Sam Lantinga
9837653b9d
Allow the application to send commands to Nintendo Switch controllers
2023-06-02 15:52:56 -07:00
Sam Lantinga
2a08bf6118
Use the bus in the HIDAPI joystick guid now that it's available
2023-05-26 08:19:04 -07:00
Sam Lantinga
af45ae7296
Update the SDL HIDAPI API to match upstream hidapi 0.14.0
2023-05-26 08:19:04 -07:00
Sam Lantinga
b252ecec6d
Fixed crash if trying to dump a packet larger than USB_PACKET_LENGTH
2023-05-26 08:19:04 -07:00
Sam Lantinga
ddbdd73258
Updated source to match SDL function prototype style
2023-05-23 11:29:41 -07:00
Sam Lantinga
2e6c48dcb4
Added support for the GameSir-G7 Controller for Xbox
2023-05-11 17:44:56 -07:00
Sam Lantinga
28f891ad0a
Allow the application to send rumble packets to Nintendo Switch controllers
2023-05-09 17:08:47 -07:00
Sam Lantinga
b6ca360228
Added support for the Saitek Cyborg V.3 Rumble Pad in PS3 mode
2023-05-03 09:47:16 -07:00
Sam Lantinga
87ad71f9b2
Rename SDL mutex, semaphore and condition variable types to match SDL 3.0 naming convention
2023-04-28 12:08:33 -07:00
Sam Lantinga
61c0c009ab
Rename SDL semaphore and condition variable functions to match SDL 3.0 naming convention
...
Fixes https://github.com/libsdl-org/SDL/issues/7642
2023-04-28 12:08:33 -07:00
Sam Lantinga
a4b4dff4a2
Added support for the Astro C40 in Xbox 360 mode
2023-04-27 17:10:44 -07:00
Sam Lantinga
44bec9c01c
Fixed build
2023-04-27 13:06:21 -07:00
Sam Lantinga
c10849b40b
Added support for new Xbox Elite 2 firmware
2023-04-27 12:33:33 -07:00
Sam Lantinga
0467301baf
Report PS3 accelerometer values in m/s2 instead of Gs
2023-04-19 13:10:39 -07:00
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