Commit Graph

25 Commits (9e45372a2f735e7d73adf16608ffdde4b6dc26d8)

Author SHA1 Message Date
Sam Lantinga 9e45372a2f Fixed build on Android and iOS 2021-01-24 00:51:25 -05:00
Sam Lantinga bf53651d73 Make sure we only do GameCube adapter initialization if we were able to load libusb 2021-01-24 00:51:24 -05:00
Sam Lantinga 3527b49459 Fixed initializing the Nyko and EVORETRO GameCube adaptors
This requires root on most Linux distributions, as we have to directly send USB messages to the devices to enable input reports.
2021-01-24 00:51:24 -05:00
Sam Lantinga c8a64ad90c Fixed building when SDL_LIBUSB_DYNAMIC is defined 2021-01-07 10:23:55 -08:00
Sam Lantinga 9130f7c377 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
Sam Lantinga ff913a22f4 Fixed compile warnings on platforms without hidapi support 2020-12-23 16:16:55 -08:00
Sam Lantinga 047b20e3b6 Fixed compile warnings on platforms without hidapi support 2020-12-23 16:11:16 -08:00
Sam Lantinga 706f63759c Fixed build for platforms with only libusb hidapi implementations 2020-12-13 01:58:05 -08:00
Sam Lantinga 43aad96681 Fixed bug 5222 - Crash when running with -DHIDAPI=ON
Mathieu Eyraud

SDL dynamically loads libusb but does not check the return value of 'SDL_LoadFunction'.

Also libusb is loaded and initialized several time because 'SDL_hidapi_wasinit' is never set to true.

I made a patch if you want to test:
  - check that 'hid_init' is called once and only once,
  - check return value of 'hid_init',
  - check return value of 'SDL_LoadFunction',
  - check return value of 'SDL_malloc',
  - add some debug logging.
2020-12-08 19:03:50 -08:00
Sam Lantinga 59f28b7f4b Fixed whitespace 2020-12-03 18:17:01 -08:00
Sam Lantinga 9fc4a4c92c Revamped Xbox One HIDAPI init sequence
Added support for querying the controller serial number on newer firmware
2020-11-24 22:25:26 -08:00
Sam Lantinga 5b3616c325 Generalized the raw input controller driver and moved XInput/WGI detection into it for XInput devices
This fixes bad report parsing for various newer Xbox controllers, and this driver is now preferred over XInput, since it handles more than 4 controllers.
2020-11-23 18:24:05 -08:00
Sam Lantinga 69a8c8468c Fixed using more than one Xbox Bluetooth controller
Don't prevent duplicate devices using hidraw, instead libusb takes precedence and all hidraw devices that aren't handled by libusb are available
2020-03-04 09:42:08 -08:00
Sam Lantinga bebc486774 We already have a hidapi implementation for Windows, we don't need libusb 2020-03-01 17:53:30 -08:00
Sam Lantinga 43aa1fa9e7 Added support for detecting previously unknown Xbox 360 and Xbox One controllers using the HIDAPI driver with libusb and Android 2020-01-18 11:21:14 -08:00
Sam Lantinga 4e682461cc Reattach the kernel driver after closing USB controllers 2020-01-17 10:43:14 -08:00
Sam Lantinga a8780c6a28 Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
Sam Lantinga 4e1cc124d2 Improved Xbox One controller initialization 2020-01-16 15:32:39 -08:00
Sam Lantinga a9482a1d60 Added support for the Nintendo GameCube adapter, tested on Steam Link hardware 2019-12-30 09:44:32 -08:00
Sam Lantinga 868551b121 Fixed duplicate controller entries on Mac OS X when using libusb, due to the HID interface number not being available in the Mac OS X HID code. 2019-12-20 21:00:16 -08:00
Sam Lantinga c5024a182d Backed out debug code 2019-12-19 15:21:44 -08:00
Sam Lantinga e22e77dadc Added an untested driver for the Nintendo GameCube adapter, based on code contributed by Ethan Lee 2019-12-19 15:01:35 -08:00
Sam Lantinga 4237b1834e Fixed compiler warning 2019-12-19 04:31:00 -08:00
Sam Lantinga 52b6ab2196 Added support for the SteelSeries Stratus Duo 2019-12-16 17:11:23 -08:00
Ethan Lee f7d82e5616 hidapi: Add SDL_hidapi.c, allows support for multiple hidapi backends.
This is currently supported on Linux and macOS. iOS and Android are not
supported at all, Windows support could be added with some changes to the libusb
backend. The Visual Studio and Xcode projects do not use this feature.

Based on Valve Software's hid.cpp, written in collaboration with Andrew Eikum.
2019-07-31 12:20:55 -04:00