|
7b3449b8
|
2022-04-04T20:46:56
|
|
Minor cleanup
|
|
4fe7b2cb
|
2022-03-24T11:00:43
|
|
static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues.
Reference issue #4600.
|
|
b944dc8f
|
2022-03-22T15:05:05
|
|
Also fix Android crash when SDL_HIDAPI_DISABLED set to 1
The Java code needs the native functions to be implemented, even if
they're not surfaced via the C API, therefore, a stub version of
functions were made only to the purpose of "fill the gaps" when
SDL_HIDAPI_DISABLED set to 1.
|
|
b559a4ac
|
2022-03-19T10:39:22
|
|
Fixed Android crash when SDL_HIDAPI_DISABLED set to 1
The Java code needs the native functions to be implemented, even if they're not surfaced via the C API.
Fixes https://github.com/libsdl-org/SDL/issues/5326
|
|
09b652b7
|
2022-03-09T13:54:23
|
|
Make sure the string properties are actually strings (thanks Nat!)
|
|
14db417e
|
2022-03-08T21:32:27
|
|
Reenable getting the serial number on macOS
We filter now on game controllers, so we shouldn't hit the crash bug on random devices that this was working around.
|
|
c3ca3445
|
2022-03-08T18:56:49
|
|
Prefer HIDAPI on macOS, as that has extended functionality
|
|
ebdd5366
|
2022-01-17T16:26:02
|
|
use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
|
|
e9511f71
|
2022-01-14T14:39:04
|
|
hidapi, libusb: don't use iconv on OS/2, it lacks wchar_t functionality.
Taken from a patch by Silvan Scherrer at bitwiseworks' OS/2 fork.
|
|
7527c8d3
|
2022-01-11T11:33:02
|
|
hidapi, libusb: provide a wcsdup implementation if it is not available.
similar to mac and android versions..
|
|
f14c7bb4
|
2022-01-09T20:33:32
|
|
added missing hidapi stuff for os/2 with libusb
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
67c4b996
|
2021-12-15T10:39:42
|
|
Fixed enabling udev hotplug detection on Linux
|
|
09465a90
|
2021-11-30T21:10:10
|
|
hidapi, windows: replace a strncpy() with plain memcpy()
mainstream has a similar change, already.
|
|
8f17af5e
|
2021-11-27T20:56:56
|
|
hidapi: mark libusb function pointers with LIBUSB_CALL.
|
|
30f04d63
|
2021-11-26T07:15:46
|
|
HIDAPI is only reliable on Android 4.3 and newer
Fixes https://github.com/libsdl-org/SDL/issues/4955
|
|
d5813776
|
2021-11-25T09:56:15
|
|
Release UDEV ressources
|
|
d31251b0
|
2021-11-21T22:30:48
|
|
use SDL's functions version inplace of libc version
|
|
343fa612
|
2021-11-20T13:17:59
|
|
hid: fix inconsistent indentation
|
|
db60b271
|
2021-11-20T13:13:17
|
|
hid: Only enumerate IOHIDDevices that are likely to be joysticks
Touching HID devices with keyboard usages will trigger a keyboard capture
permission prompt on macOS 11+. See #4887
Like the IOKit joystick backend, we accept HID devices that have joystick,
gamepad, or multi-axis controller usages. We also allow the Valve VID for
the Steam Controller, just like the Windows HIDAPI implementation does.
|
|
b6796597
|
2021-11-19T11:55:50
|
|
SDL_hidapi.c: fix SDL_udev.h include path
fixes https://github.com/libsdl-org/SDL/issues/4981
|
|
d2cf1919
|
2021-11-17T10:00:10
|
|
hidapi, linux: merged a minor warning + code style fix from mainstream.
|
|
66058bbb
|
2021-11-15T16:52:56
|
|
Fixed exception accessing Bluetooth devices on Android 12
Since accessing Bluetooth prompts the user for permission on both Android and iOS, and we only need it for Steam Controller support, we'll leave it off by default. You can enable it by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()
Fixes https://github.com/libsdl-org/SDL/issues/4952
|
|
5fc7a90a
|
2021-11-12T10:00:41
|
|
Fix refcounting in SDL_hid_exit
|
|
162772aa
|
2021-11-11T20:50:54
|
|
Fixed build warnings on Android
|
|
9c3bcf8e
|
2021-11-11T17:31:14
|
|
Added SDL_hid_ble_scan() for pairing Steam Controllers on iOS and tvOS
|
|
911d91c5
|
2021-11-11T14:35:51
|
|
Retry hid_send_feature_report() if the ioctl() fails with EPIPE (e.g. the device stalled)
|
|
b9b0df40
|
2021-11-11T12:52:31
|
|
Fixed Linux build
|
|
c9ada1c1
|
2021-11-11T12:45:38
|
|
Made HIDAPI device change notifications available via SDL_hid_device_change_count()
|
|
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.
|
|
0f2bf629
|
2021-11-09T06:20:46
|
|
Fixed building hidapi when libusb is available
|
|
b8327a4a
|
2021-11-08T07:19:45
|
|
Added SDL_HIDAPI_DISABLED so it can be disabled like other SDL subsystems
|
|
f61b10dc
|
2021-11-08T06:34:32
|
|
Do more robust validation of devices passed to the SDL HIDAPI functions
|
|
dd8c3548
|
2021-11-08T17:00:56
|
|
SDL_hidapi.c: avoid possible NULL pointer dereferences.
|
|
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.
|
|
db18764e
|
2021-10-01T16:27:59
|
|
Use correct relative include path
|
|
bf97c5a2
|
2021-09-08T14:47:40
|
|
Make sure SDL file descriptors don't leak into child processes
|
|
7d66fa20
|
2021-09-07T17:38:26
|
|
Fixed double-copy of the report in BlueZ >= 5.56
|
|
8b1f8b6e
|
2021-08-27T11:14:09
|
|
Use the high speed alternate setting on new Microsoft Xbox controllers
|
|
a91ab883
|
2021-08-06T12:28:03
|
|
Fixed building on Windows with cmake, ninja, and clang
|
|
f93e9047
|
2021-07-08T18:44:50
|
|
Implemented the timeout in hid_read_timeout() on Android
This fixes detecting PS5 controllers connected over USB
|
|
814285d6
|
2021-06-23T09:19:02
|
|
Workaround for crash on Apple Mac M1 hardware
|
|
0e62926e
|
2021-06-10T16:28:32
|
|
Fixed crash if vendor or product strings are empty
|
|
cb5e8635
|
2021-06-08T13:15:24
|
|
Fixed crash after reinitializing libusb HID support
|
|
6de33c09
|
2021-06-03T09:05:33
|
|
Clarify why we're skipping Game Controller framework supported devices in hid.c
|
|
28da6c5d
|
2021-05-27T14:42:03
|
|
Have HIDAPI skip MFI supported HID devices on macOS to avoid duplicate devices.
|
|
17d8479d
|
2021-04-22T15:44:01
|
|
hidapi/libusb: maintain in-memory cache of vendor/product strings
The get_usb_string call is rather expensive on some USB devices, so we
cache the vendor/product strings for future lookups (e.g. when
hid_enumerate is invoked again later).
This way, we only need to ask libusb for strings for devices we haven't
seen since before we started.
Signed-off-by: Steven Noonan <steven@valvesoftware.com>
Signed-off-by: Sam Lantinga <slouken@libsdl.org>
|
|
3377861a
|
2021-03-26T11:57:19
|
|
Added support for the Amazon Game Controller to the HIDAPI driver
|
|
1133ea03
|
2021-03-22T19:18:57
|
|
Fixed crash on macOS when AirPods are connected
|
|
1f7ec3fa
|
2021-02-11T17:27:22
|
|
Added support for the PowerA Xbox One Series X Wired Controller
|
|
bb9e049d
|
2021-02-07T00:37:00
|
|
minor updates to libc function checks
|
|
1dc9180f
|
2021-01-27T21:30:25
|
|
Fixed compiler warnings
|
|
d59a9268
|
2021-01-27T21:30:21
|
|
Fixed build warning
|
|
eb83da02
|
2021-01-27T21:30:17
|
|
Fixed PS4 controllers over Bluetooth on Windows 7
|
|
a4db44fa
|
2021-01-27T12:41:37
|
|
The Sharkoon Skiller SGH2 headset hangs in DirectInput enumeration, so avoid it here just in case.
See bug 5485 for details.
|
|
e91f83c1
|
2021-01-22T20:03:50
|
|
hidapi.h: adjust so that it gives a smaller diff against mainstream
|
|
d4794028
|
2021-01-22T08:45:38
|
|
Fixed build
|
|
9e45372a
|
2021-01-21T22:47:37
|
|
Fixed build on Android and iOS
|
|
bf53651d
|
2021-01-21T22:32:17
|
|
Make sure we only do GameCube adapter initialization if we were able to load libusb
|
|
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.
|
|
07f83cd5
|
2021-01-19T19:50:10
|
|
hidapi/libusb/hid.c: fix race condition on device close (bug #5484)
From hidapi mainstream git: https://github.com/libusb/hidapi/issues/142
https://github.com/libusb/hidapi/commit/d2c3a9862eefe2d3f4db0f00c0238277bfb4e44b
Read callback may fire itself on its own even after its been requested
to stop and exactly before the calling code waits for its completion in
indefinite loop. Explicitly preventing re-fireing the submission loop
fixes the issue.
|
|
327ea974
|
2021-01-19T15:50:02
|
|
hidapi/libusb/hid.c: whitespace tidy-up.
|
|
c8a64ad9
|
2021-01-07T10:23:55
|
|
Fixed building when SDL_LIBUSB_DYNAMIC is defined
|
|
bf754b52
|
2021-01-04T12:17:24
|
|
Valve contributed code is under the Zlib license
|
|
01a2f276
|
2021-01-04T01:23:50
|
|
consistently use TEXT() macro with LoadLibrary() and GetModuleHandle()
cf. bug #5435.
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
f0b6c787
|
2021-01-02T09:58:08
|
|
Fixed Windows XP compatibility with recent hidapi commit
|
|
414ddc32
|
2021-01-01T17:34:07
|
|
Do not wait in GetOverlappedResult() in hid_read_timeout()
This is unsafe because the event is auto-reset, therefore the call to
WaitForSingleObject() resets the event which GetOverlappedResult() will
try to wait on.
Even though the overlapped operation is guaranteed to be completed at
the point we call GetOverlappedResult(), it will still wait on the event
handle for a short time to trigger the reset for auto-reset events. This
amounts to roughly a 100 ms sleep each time GetOverlappedResult() is called
for a completed I/O with a non-signalled event.
In the context of HIDAPI, this extra sleep means that callers that loop
on hid_read_timeout() with timeout=0 will loop forever, since the 100 ms
sleep each iteration ensures ReadFile() will always have new data.
|
|
ab55ec48
|
2021-01-01T11:12:41
|
|
Fix use-after-free SBH corruption due to overlapped ReadFile in hidapi not being canceled for all threads before device close
- hidapi already called CancelIo on hid_close but that only cancels pending IO for the current thread. Controller read/writes originate from multiple
threads (serialized, but on a different thread nonetheless) but device destruction was always done on the main device thread which left any
pending overlapped reads still running after hidapi's internal read buffer is deallocated leading to intermittent free list corruption.
|
|
ff913a22
|
2020-12-23T16:16:55
|
|
Fixed compile warnings on platforms without hidapi support
|
|
047b20e3
|
2020-12-23T16:11:16
|
|
Fixed compile warnings on platforms without hidapi support
|
|
90456670
|
2020-12-17T14:11:00
|
|
more "'for' loop initial declarations are only allowed in C99 mode" fixes
|
|
14f97734
|
2020-12-15T14:57:47
|
|
Fixed whitespace
|
|
706f6375
|
2020-12-13T01:58:05
|
|
Fixed build for platforms with only libusb hidapi implementations
|
|
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.
|
|
59f28b7f
|
2020-12-03T18:17:01
|
|
Fixed whitespace
|
|
9fc4a4c9
|
2020-11-24T22:25:26
|
|
Revamped Xbox One HIDAPI init sequence
Added support for querying the controller serial number on newer firmware
|
|
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.
|
|
a94fe009
|
2020-11-21T18:40:27
|
|
Moved comment with the code it covers
|
|
49f7be6d
|
2020-11-21T18:37:56
|
|
Fixed compile warning C4127: conditional expression is constant
|
|
63b52e8e
|
2020-11-21T18:34:32
|
|
Remove SDL dependency in Windows code
|
|
d4954eb0
|
2020-11-21T18:26:43
|
|
Removed debug code
|
|
b442e617
|
2020-11-21T18:15:55
|
|
Fixed adding an extra zero byte for feature reports
At least with PS4 and PS5 controllers DeviceIoControl() returns the correct value
|
|
6b56b98f
|
2020-11-21T09:26:11
|
|
Fixed is_BLE() return value
|
|
65c9f1d2
|
2020-11-21T09:06:48
|
|
Fixed upstream bug: FD 0 is a valid file descriptor
https://github.com/libusb/hidapi/issues/199
|
|
b0b76a61
|
2020-11-19T07:12:53
|
|
Fixed rumble on PS5 controllers connected to Windows over Bluetooth
|
|
30371f2d
|
2020-11-13T13:17:04
|
|
Fixed doubled report ID for Bluetooth Classic devices on Linux
|
|
e12457d8
|
2020-11-10T12:26:30
|
|
Added support for the Xbox Series X controller to the HIDAPI driver
|
|
b3a34c94
|
2020-05-06T03:18:25
|
|
hid: Add Microsoft Precision Mouse to the joystick blacklist.
Same deal as the Razer keyboards, it hangs the enumeration.
|
|
85d97410
|
2020-05-06T03:13:44
|
|
hid: Cleanup Windows joystick blacklist code, to make additions easier.
|
|
3625b83c
|
2020-04-21T01:32:48
|
|
hid: Add Razer Arctosa keyboard to hid enumeration blacklist.
Hangs SDL, same as the Razer Lycosa.
Fixes Bugzilla #5101.
|
|
eaaa809e
|
2020-04-15T13:33:09
|
|
hidapi: Blacklist the Razer Lycosa keyboard from enumeration.
It's not a joystick and it hangs device enumeration.
|
|
6e646b61
|
2020-03-20T20:53:26
|
|
Removed blacklist entries for devices that aren't game controllers, allow Steam Controllers
|
|
5ed71f3b
|
2020-03-20T13:44:50
|
|
Only enumerate HID devices on Windows that have gamepad HID usages
There are a number of poorly behaved HID devices that time out on attempts to
read various strings. Rather than end up on an endless treadmill of blacklisting
broken devices, reduce our risk by only querying devices that are gamepads.
SDL_hidapijoystick.c already checks these same usages, so we shouldn't
exclude any working HID devices (caveat below).
This also makes HidP_GetPreparsedData() and HidP_GetCaps() failure skip
the device entirely, but that seems desired. If a device can't even return basic
top-level collection data properly, we want nothing to do with that broken device.
If we do find devices that work with HIDAPI joystick and fail these calls, we can
add an exception via VID+PID matching.
|
|
19c34844
|
2020-03-13T19:19:29
|
|
Fixed slow enumeration when Apple Cinema HD display 30" is plugged in
|
|
cb986aff
|
2020-03-13T13:05:32
|
|
Fixed exception at shutdown if the controllers are closed after the HIDDeviceManager is shutdown
|
|
133b4755
|
2020-03-11T14:17:19
|
|
Use LIBUSB_CALL for hidapi's read_callback function
|
|
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
|
|
96836ec6
|
2020-03-03T09:22:43
|
|
Add 500ms max wait time for hid_write to complete on Windows
It appears that with some (presumably) flaky drivers or hardware that the WriteFile in hid_write never completes leading to GetOverlappedResult to block forever waiting for it.
|
|
07000bfc
|
2020-03-02T17:31:58
|
|
Fixed bug 5010 - SDL_Init with SDL_INIT_JOYSTICK hangs for 10 seconds when playing audio from another application
Jake Breen
I have tracked it down to a call on
hid_device_info() -> HidD_GetManufacturerString (Line 499 in src\hidapi\windows\hid.c)
|