src/hidapi/SDL_hidapi.c


Log

Author Commit Date CI Message
chalonverse 3b191580 2022-06-27T17:19:39 Windows GDK Support (#5830) * Added GDK * Simplfied checks in SDL_config_wingdk.h * Added testgdk sample * Added GDK readme * Fixed error in merge of SDL_windows.h * Additional GDK fixes * OpenWatcom should not export _SDL_GDKGetTaskQueue * Formatting fixes * Moved initialization code into SDL_GDKRunApp
Sam Lantinga ce576323 2022-06-10T12:42:45 The backlight event is "change", not "add" or "remove"
Ethan Lee 964e979d 2022-05-30T16:17:04 hidapi: Allow disabling libusb support at runtime
Sam Lantinga bef9f2b2 2022-05-26T20:45:13 Don't trigger device notifications when Steam Deck backlight changes
Sam Lantinga 22d6e09a 2022-05-25T11:04:58 Don't try to call hid_ble_scan() if HIDAPI is disabled Fixes https://github.com/libsdl-org/SDL/issues/5699
Eddy Jansson a40405d7 2022-04-20T18:06:02 hidapi: Wrap CopyHIDDeviceInfo in define checks. The purpose of this is to silence a 'defined but not used' warning.
Sam Lantinga 7b3449b8 2022-04-04T20:46:56 Minor cleanup
Ozkan Sezer f14c7bb4 2022-01-09T20:33:32 added missing hidapi stuff for os/2 with libusb
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sam Lantinga 67c4b996 2021-12-15T10:39:42 Fixed enabling udev hotplug detection on Linux
Ozkan Sezer 8f17af5e 2021-11-27T20:56:56 hidapi: mark libusb function pointers with LIBUSB_CALL.
Sylvain d5813776 2021-11-25T09:56:15 Release UDEV ressources
Ozkan Sezer b6796597 2021-11-19T11:55:50 SDL_hidapi.c: fix SDL_udev.h include path fixes https://github.com/libsdl-org/SDL/issues/4981
Mathieu Eyraud 5fc7a90a 2021-11-12T10:00:41 Fix refcounting in SDL_hid_exit
Sam Lantinga 9c3bcf8e 2021-11-11T17:31:14 Added SDL_hid_ble_scan() for pairing Steam Controllers on iOS and tvOS
Sam Lantinga b9b0df40 2021-11-11T12:52:31 Fixed Linux build
Sam Lantinga c9ada1c1 2021-11-11T12:45:38 Made HIDAPI device change notifications available via SDL_hid_device_change_count()
Sam Lantinga 6c4b4ee7 2021-11-10T09:41:43 Don't assert on API parameters This causes lots of spam in test automation and it's not clear it's useful to developers. If we need this level of validation, we should add a log category for it.
Sam Lantinga 0f2bf629 2021-11-09T06:20:46 Fixed building hidapi when libusb is available
Sam Lantinga b8327a4a 2021-11-08T07:19:45 Added SDL_HIDAPI_DISABLED so it can be disabled like other SDL subsystems
Sam Lantinga f61b10dc 2021-11-08T06:34:32 Do more robust validation of devices passed to the SDL HIDAPI functions
Ozkan Sezer dd8c3548 2021-11-08T17:00:56 SDL_hidapi.c: avoid possible NULL pointer dereferences.
Sam Lantinga 5b646cd1 2021-11-07T22:58:44 Build hidapi code into SDL as a new public API This prevents conflicts with hidapi linked with applications, as well as allowing applications to make use of HIDAPI on Android and other platforms that might not normally have an implementation available.
Sam Lantinga d4794028 2021-01-22T08:45:38 Fixed build
Sam Lantinga 9e45372a 2021-01-21T22:47:37 Fixed build on Android and iOS
Sam Lantinga bf53651d 2021-01-21T22:32:17 Make sure we only do GameCube adapter initialization if we were able to load libusb
Sam Lantinga 3527b494 2021-01-21T22:30:34 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.
Sam Lantinga c8a64ad9 2021-01-07T10:23:55 Fixed building when SDL_LIBUSB_DYNAMIC is defined
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga ff913a22 2020-12-23T16:16:55 Fixed compile warnings on platforms without hidapi support
Sam Lantinga 047b20e3 2020-12-23T16:11:16 Fixed compile warnings on platforms without hidapi support
Sam Lantinga 706f6375 2020-12-13T01:58:05 Fixed build for platforms with only libusb hidapi implementations
Sam Lantinga 43aad966 2020-12-08T19:03:50 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.
Sam Lantinga 59f28b7f 2020-12-03T18:17:01 Fixed whitespace
Sam Lantinga 9fc4a4c9 2020-11-24T22:25:26 Revamped Xbox One HIDAPI init sequence Added support for querying the controller serial number on newer firmware
Sam Lantinga 5b3616c3 2020-11-23T18:24:05 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.
Sam Lantinga 69a8c846 2020-03-04T09:42:08 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
Sam Lantinga bebc4867 2020-03-01T17:53:30 We already have a hidapi implementation for Windows, we don't need libusb
Sam Lantinga 43aa1fa9 2020-01-18T11:21:14 Added support for detecting previously unknown Xbox 360 and Xbox One controllers using the HIDAPI driver with libusb and Android
Sam Lantinga 4e682461 2020-01-17T10:43:14 Reattach the kernel driver after closing USB controllers
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Sam Lantinga 4e1cc124 2020-01-16T15:32:39 Improved Xbox One controller initialization
Sam Lantinga a9482a1d 2019-12-30T09:44:32 Added support for the Nintendo GameCube adapter, tested on Steam Link hardware
Sam Lantinga 868551b1 2019-12-20T21:00:16 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.
Sam Lantinga c5024a18 2019-12-19T15:21:44 Backed out debug code
Sam Lantinga e22e77da 2019-12-19T15:01:35 Added an untested driver for the Nintendo GameCube adapter, based on code contributed by Ethan Lee
Sam Lantinga 4237b183 2019-12-19T04:31:00 Fixed compiler warning
Sam Lantinga 52b6ab21 2019-12-16T17:11:23 Added support for the SteelSeries Stratus Duo
Ethan Lee f7d82e56 2019-07-31T12:20:55 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.