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
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
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
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
5b3b7e6e7c
Separated PS4/PS5 effects support into individual capabilities
2022-09-23 16:46:36 -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
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
6cbdc66650
Fixed use of uninitialized 'size' variable (thanks @ozkan!)
2022-09-22 09:05:06 -07:00
Sam Lantinga
0c4594ac72
Improved PS4 and PS5 third-party controller feature detection
2022-09-22 06:45:46 -07:00
Sam Lantinga
2e9f5b5989
Added support for the HORI Fighting Commander OCTA (Xbox Series X and PS versions)
2022-09-16 15:41:35 -07:00
Amir
7f415ce587
android: fix some compiler warnings
2022-09-12 10:06:08 -07:00
Sam Lantinga
d93f9a778b
The new Wii Remote shares the same VID/PID as the Wii U Pro controller
2022-09-07 12:33:43 -07:00
Sam Lantinga
87f8b6ff0f
Don't mess with the state of the Motion Plus extension on Linux
2022-09-07 01:21:01 -07:00
Sam Lantinga
c28da4892a
Fixed build
2022-09-07 00:52:40 -07:00
Sam Lantinga
638452ecf7
Assert that continuous reporting is enabled, so input timeout is a reliable way of detecting Bluetooth connection problems.
2022-09-07 00:44:13 -07:00
Sam Lantinga
8dfe0e4beb
Removed checks not needed for the Wii U Pro Controller
2022-09-07 00:41:29 -07:00
Sam Lantinga
4018f35ef2
Added left and right sensors for Nintendo Joy-Con and Wii controllers
2022-09-07 00:00:27 -07:00
Sam Lantinga
30f55a5d59
Added initial support for the Wii Motion Plus extension
...
This adds a gyro sensor to the Wii controller, and is enabled in standalone and nunchuk mode
2022-09-06 23:33:55 -07:00
Sam Lantinga
d1fea10c0f
Added support for the accelerometer in the Wii Remote
2022-09-05 16:08:15 -07:00
Sam Lantinga
a61b823da8
Added support for the Wii Remote with the Classic Controller Pro extension
...
Also changed event order to: buttons, triggers, axes, for consistency with other drivers
2022-09-05 14:32:45 -07:00
Ozkan Sezer
612a86ebad
HIDAPI_DriverPS3_UpdateEffects: kill bad use of & operator on effects[]
2022-09-05 20:47:00 +03:00
Sam Lantinga
b00e1b1b62
Added support for a ShanWan PS2 -> PS3 USB converter to the HIDAPI driver
2022-09-05 10:01:51 -07:00