8 Commits

Author SHA1 Message Date
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
cdaafcec0d The Kinvoca Joy-Cons are handled by the Joy-Con driver, not the Switch Pro driver. 2022-08-30 14:56:11 -07:00
Sam Lantinga
52b6899a6b Added hints for more fine grained control over HIDAPI Xbox controller support 2022-08-19 11:11:23 -07:00
Sam Lantinga
e49321cec5 Fixed double-free in combined HIDAPI controller code 2022-08-10 08:21:15 -07:00
Sam Lantinga
201484ff6f Don't duplicate the serial number twice if a child doesn't set one 2022-08-09 09:03:28 -07:00
Sam Lantinga
d90c0d41cc Include the child serial numbers in the serial number for a HIDAPI combined device 2022-08-09 09:00:56 -07:00
Sam Lantinga
47ebf0087a Fixed shadow variable warning 2022-08-08 08:36:17 -07:00
Sam Lantinga
ab967475c6 Greatly improved Nintendo Joy-Con support using the HIDAPI driver
* Added support for mini-gamepad mode for Joy-Con controllers, matching the mapping for hid-nintendo on Linux and iOS 16
* Added the ability to merge left and right Joy-Con controllers into a single Pro-style controller
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_COMBINE_JOY_CONS to control this merging functionality
* Removed the hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
2022-07-28 19:38:38 -07:00