1356 Commits

Author SHA1 Message Date
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
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
Ivan Epifanov
08a331847b Vita: fix controls on PSTV with opened IME 2022-09-20 11:03:34 -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
Sam Lantinga
5892ed4373 Fixed Xcode warnings on macOS 2022-09-16 09:44:39 -07:00
Sam Lantinga
eb046958da Fixed build warning 2022-09-16 08:19:45 -07:00
Sam Lantinga
4f1b408a72 Fixed button mapping for PS5 controllers 2022-09-12 18:19:02 -07:00
Amir
7f415ce587 android: fix some compiler warnings 2022-09-12 10:06:08 -07:00
Sam Lantinga
a3900a751e Lock joysticks when removing a controller on the WGI thread 2022-09-08 13:59:25 -07:00
Sam Lantinga
12413ab31f Lock joysticks while attaching a virtual one 2022-09-08 13:33:21 -07:00
Ozkan Sezer
787cd580ee silence unused function warning for SDL_endswith() on non-linux. 2022-09-08 23:00:04 +03:00
Sam Lantinga
4071573241 Don't try to second guess DS4Windows, let it remap things as expected.
DS4Windows can create both emulated Xbox and emulated PS4 controllers, and we don't know which the user has it doing, so don't try to second guess it, just let it do it's thing. Users should follow the remapping software recommendations on when to enable/disable it for various situations.

Fixes https://github.com/libsdl-org/SDL/issues/6167
2022-09-08 11:50:56 -07:00
Sam Lantinga
a0f169603d Fixed the CRC in the mappings for PS2, PSP, and Vita controllers 2022-09-08 09:53:51 -07:00
Sam Lantinga
0ad8d9d292 SDL_IsXInputDevice() shouldn't return true if XInput isn't enabled 2022-09-07 15:31:24 -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
f398d8a424 Note that the Logitech Extreme 3D is a flight stick 2022-09-07 11:53:13 -07:00
Sam Lantinga
0a05b281f2 Make sure we hold the joystick lock when updating the device state while opening it 2022-09-07 11:51:51 -07:00
Sam Lantinga
d4e0d27c1c Added Wii Remote controller mappings for Linux 2022-09-07 02:02:04 -07:00
Sam Lantinga
42cf6d6c56 Don't treat the Wii extension controls as a separate game controller on Linux 2022-09-07 01:41:11 -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
Sam Lantinga
1b4e08b89e Added an entry for the Hori Fighting Stick mini 4 kai
This is a PS3/PS4 arcade stick which becomes an Xbox 360 controller on PC
2022-09-02 17:04:53 -07:00
Sam Lantinga
47f2373dc1 Added locking for Android joystick events 2022-09-02 16:52:55 -07:00
Sam Lantinga
e8f6b7503a Added mappings for the ASUS ROG Kunai 3 Gamepad 2022-09-02 15:06:13 -07:00
Sam Lantinga
5770e87cb2 Fixed regression handling touchpad input with PS5 controllers using the original shipping firmware 2022-09-02 13:57:59 -07:00
Sam Lantinga
253f6a913d Variable renaming for consistency 2022-09-02 11:49:06 -07:00
Sam Lantinga
5002624e8a Fixed crash when extension controllers are hotplugged 2022-09-02 11:41:19 -07:00
Sam Lantinga
7df571ffc6 HIDAPI_DumpPacket() takes a const memory pointer 2022-09-02 11:37:16 -07:00
Sam Lantinga
b6d23d21db Fixed interactions with the Linux Wiimote driver 2022-09-02 11:21:51 -07:00
Ozkan Sezer
0c984360d1 SDL_hidapi_wii.c: fix a -Wshadow warning 2022-09-02 20:02:56 +03:00
Sam Lantinga
b6b3fb0023 This was intended to be Uint8 2022-09-02 09:59:32 -07:00
Ozkan Sezer
5be157b3a2 SDL_hidapi_wii.c: fix -Wpointer-sign warnings 2022-09-02 19:33:40 +03:00
Sam Lantinga
54356f41a9 Wii: fixed trigger axis reporting for the Wii U Pro Controller 2022-09-02 09:03:44 -07:00
Sam Lantinga
a35642fa3e Wii: don't bother reading the extension type for the Wii U Pro controller, we already know what it is 2022-09-02 08:58:52 -07:00
Sam Lantinga
c3ecb9d099 Wii: re-request the status if we get a communication error 2022-09-02 08:58:52 -07:00
Ozkan Sezer
0c24b46e9f SDL_hidapi_wii.c: fix build in c89 mode. 2022-09-02 18:55:00 +03:00
Sam Lantinga
9874fc4e6a Reconnect as a different controller if the Wii extension hardware changes 2022-09-02 08:47:15 -07:00
Sam Lantinga
5f3cb54972 Updated Wii support with @tellowkrinkle's changes in 2f288e9d5b 2022-09-02 08:28:28 -07:00