Sam Lantinga
efdb390caa
Disable the HIDAPI Wii driver by default as it doesn't work with the dolphinbar
2022-10-09 09:11:33 -07:00
Sam Lantinga
33050fea39
Only open HID devices that might have a HIDAPI driver available
...
This prevents an OS prompt for every connected device when running on Android
2022-10-07 11:29:49 -07:00
Sam Lantinga
fc720321b3
Fix rare deadlock when opening a HID controller on Android
...
Fixes https://github.com/libsdl-org/SDL/issues/6347
2022-10-06 18:23:07 -07:00
Sam Lantinga
689409fd97
Fixed the start button on the Nimbus+ controller on tvOS
...
Also updated mappings for Nintendo Switch controllers on tvOS, to reflect the lack of guide/menu button availability
2022-10-06 17:34:24 -07:00
Sam Lantinga
ddc3de602e
Added mapping for PS5 controller over Bluetooth on Android 12
...
Tested on Pixel 3a
2022-10-05 16:24:05 -07:00
Sam Lantinga
81afb3e303
Need to swap endianness when extracting the CRC from game controller mappings
2022-10-05 16:18:42 -07:00
Sam Lantinga
3607f8316f
Find out if a controller is wireless using WGI (thanks @DJm00n!)
...
Confirmed using an Xbox Series X controller over USB and Bluetooth
Fixes https://github.com/libsdl-org/SDL/issues/6322
2022-10-03 11:02:23 -07:00
Sam Lantinga
bd6afc2317
Fixed sensor axes in vertical mode
2022-10-02 10:15:39 -07:00
Sam Lantinga
b4c25f5714
Remapped the side button and trigger as paddles for the mini-gamepad mode of the Joy-Cons
...
This is the only case where the mapping differs between right and left Joy-Cons in mini-gamepad mode. The left Joy-Con will have the left paddles and the right Joy-Con will have the right paddles. This facilitates co-op gameplay with individual actions while still using the normal mini-gamepad mode.
The paddles are used for this because conceptually they are more awkward to hit than the normal controls and they are in roughly the correct hand position.
2022-10-02 09:51:05 -07:00
Sam Lantinga
f58a6506a1
Added paddle mapping for combined Joy-Cons
2022-10-02 09:50:27 -07:00
Sam Lantinga
37dfa2629b
Added paddle mapping for combined Joy-Cons
2022-10-02 09:36:50 -07:00
Happy Harry
6c8bf3af4c
Add vertical mode for Nintendo Joy-Con ( #6303 )
...
* Added support for vertical mode for Joy-Con controllers
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS for switching to this mode
* Added support for SL/SR buttons in combined/vertical mode and L/ZL/R/ZR buttons in mini-gamepad mode
2022-10-02 09:19:34 -07:00
Sam Lantinga
0672dc8d8f
Fixed combined Joy-Cons after aa2e2f4843
(thanks @happyharryh!)
2022-10-02 08:50:11 -07:00
Sam Lantinga
7becbd7d42
Add joystick locking for controller notifications on iOS/tvOS
...
Fixes https://github.com/libsdl-org/SDL/issues/6288
2022-09-27 12:58:16 -07:00
Sam Lantinga
18eb319adc
Added sensor timestamp for Nintendo Switch controllers
2022-09-27 12:34:03 -07:00
Sam Lantinga
5e3a40309e
Added sensor timestamp for Steam Controllers
2022-09-27 11:36:01 -07:00
Sam Lantinga
2c518747b9
Added microsecond timestamp to sensor values for PS4 and PS5 controllers using the HIDAPI driver
2022-09-27 09:56:49 -07:00
Sam Lantinga
1e1be0b954
Updated logic to match between PS4/PS5/Switch controllers
2022-09-26 23:00:58 -07:00
Sam Lantinga
8c40a6b0c7
Drop PS5 Bluetooth reports that fail CRC check
2022-09-26 22:47:21 -07:00
Sam Lantinga
db075ff3ba
Removed unused variable
2022-09-26 22:45:01 -07:00
Sam Lantinga
2ccdd0667a
Handle DS4 dongle controller connection and disconnection
...
We also drop Bluetooth packets that fail the CRC check, as recommended by Sony
2022-09-26 22:34:33 -07:00
Sam Lantinga
18046b9aa3
Fixed crash with a NULL serial number
2022-09-26 20:53:50 -07:00
Sam Lantinga
67fa6a935f
Don't wait a long time for zombie Bluetooth controllers
...
If a Nintendo Switch Pro controller is turned off, it will leave the controller connected in Windows, but not responding to reports. Don't wait a really long time trying to get information from a controller in this state.
2022-09-26 20:49:26 -07:00
Sam Lantinga
67db8a9103
Wait for input before reconnecting a Bluetooth device
...
On Windows, the Bluetooth device can remain in a connected state if the controller just shut down. It won't return any errors, but it also won't generate any input reports in this state, so wait until we know for sure that the Bluetooth controller is sending data before letting the application know it's available.
2022-09-26 20:43:46 -07:00
Sam Lantinga
2cc9176137
Removed debug logging
2022-09-26 18:52:26 -07:00
Sam Lantinga
2c98c8af01
Use better default values for Switch controller calibration
2022-09-26 18:39:47 -07:00
Sam Lantinga
a205c5e26c
Use separate extents for simple and advanced reports
2022-09-26 18:39:47 -07:00
Sam Lantinga
b7fddb4c0e
Minor tweaks
2022-09-26 14:39:51 -07:00
Sam Lantinga
39adcc0a6b
Prefer USB input over Bluetooth for PS5/PS5/Switch controllers
...
Nintendo Switch controllers will automatically turn off Bluetooth when connected over USB, but this takes care of that a little more quickly.
PS4 and PS5 controllers will happily send reports over both Bluetooth and USB, so we'll prefer USB if connected and switch back to Bluetooth if USB is disconnected.
2022-09-26 14:20:34 -07:00
Sam Lantinga
17d7d03adf
Added detection of the joystick type for third party PS4 and PS5 controllers
2022-09-26 08:12:35 -07:00
Sam Lantinga
8d2cb1555e
Added an entry for the ZEROPLUS P4 Wired Gamepad
2022-09-23 16:56:24 -07:00
Sam Lantinga
cb063db64f
Moved XInputPS4 controllers into the PS4 controller section
2022-09-23 16:52:37 -07:00
Sam Lantinga
5b3b7e6e7c
Separated PS4/PS5 effects support into individual capabilities
2022-09-23 16:46:36 -07:00
Sam Lantinga
33619aa2e9
Added support for the ZEROPLUS P4 Wired Gamepad to the HIDAPI driver
2022-09-23 16:38:15 -07:00
Sam Lantinga
e888c99fa6
Fixed the entry for the Nacon PS4 Compact Controller
2022-09-23 16:26:41 -07:00
Sam Lantinga
4ea64fee9f
Fixed manufacturer/product name deduplication for the Razer Raiju Tournament Edition controller
2022-09-23 15:29:00 -07:00
Sam Lantinga
56b91ea720
Fixed feature detection for the Razer Raiju Tournament Edition controller
2022-09-23 15:29:00 -07:00
Sam Lantinga
34f928abb7
Generate the correct name for ASTRO Gaming controllers
...
Manufacturer "ASTRO Gaming" and product "ASTRO C40" turns into "ASTRO C40"
2022-09-23 09:26:18 -07:00
Sam Lantinga
6ddef7c234
Generate the correct name for Qanba and Mad Catz controllers
2022-09-23 09:20:27 -07:00
Sam Lantinga
c2ae2ccc32
Added feature support for the Razer Raiju to the HIDAPI driver
2022-09-23 09:11:12 -07:00
Sam Lantinga
51fefd1c35
Added support for third party PS3 controllers to the HIDAPI driver
2022-09-23 02:39:35 -07:00
Sam Lantinga
5b4c10fc7b
Return true from IsSupportedDevice if it's a device that we _might_ support
...
This forces an update of the device list so we have the correct state when we check to see whether a device is being handled by HIDAPI
2022-09-23 02:36:53 -07:00
Sam Lantinga
1d34a5249d
Fixed shadowed variable warning
2022-09-23 00:38:23 -07:00
Sam Lantinga
010d3e6442
Fixed function prototype mismatch
2022-09-23 00:36:46 -07:00
Sam Lantinga
b7940c29cc
Allow HIDAPI controllers to override the default joystick type
2022-09-23 00:15:40 -07:00
Sam Lantinga
899a1e7cba
Skip PS4/PS5 probe message if we already know it's a supported controller
2022-09-22 23:54:26 -07:00
Sam Lantinga
fa2063fb44
Improved detection of third party PS4 and PS5 controllers
2022-09-22 23:42:25 -07:00
Sam Lantinga
aa2e2f4843
Make sure HID devices can be opened before making them available to the application
...
This prevents a number of issues where devices are enumerated but not actually able to be opened, like https://github.com/libsdl-org/SDL/issues/5781 .
We currently leave the devices open, allowing us to more easily do controller feature detection, protocol negotiation, detect dropped Bluetooth connections, etc. with the expectation that the application is likely to open the controllers shortly.
2022-09-22 18:27:38 -07:00
Sam Lantinga
2857e3c748
Added an entry for the Mad Catz FightStick TE 2+ PS3
2022-09-22 15:53:32 -07:00
Sam Lantinga
6812f1b5d7
Fixed the entry for the HORI Fighting Commander 4 in PS4 mode
2022-09-22 15:16:34 -07:00