Sam Lantinga
15a9890919
Added SDL_HINT_HIDAPI_IGNORE_DEVICES to specify devices that should be ignored in SDL_hid_enumerate()
2022-11-05 16:44:52 -07:00
Sam Lantinga
f6b1e028ab
Allow vendor matching for hid_enumerate() on all backends
2022-10-29 10:43:11 -07:00
Jonatha Gabriel
b944dc8f2e
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.
2022-03-22 12:12:16 -07:00
Sam Lantinga
b559a4accc
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
2022-03-19 10:39:22 -07:00
Sam Lantinga
30f04d63e6
HIDAPI is only reliable on Android 4.3 and newer
...
Fixes https://github.com/libsdl-org/SDL/issues/4955
2021-11-26 07:15:46 -08:00
Sylvain
d31251b014
use SDL's functions version inplace of libc version
2021-11-22 08:38:46 -08:00
Sam Lantinga
66058bbbd5
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
2021-11-15 16:52:56 -08:00
Sam Lantinga
162772aa63
Fixed build warnings on Android
2021-11-11 20:50:54 -08:00
Sam Lantinga
b8327a4a48
Added SDL_HIDAPI_DISABLED so it can be disabled like other SDL subsystems
2021-11-08 07:19:45 -08:00
Sam Lantinga
5b646cd19e
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.
2021-11-07 23:00:59 -08:00
Sam Lantinga
f93e9047eb
Implemented the timeout in hid_read_timeout() on Android
...
This fixes detecting PS5 controllers connected over USB
2021-07-08 18:44:50 -07:00
Sam Lantinga
bf754b52bf
Valve contributed code is under the Zlib license
2021-01-04 12:17:24 -08:00
Sam Lantinga
cb986aff9f
Fixed exception at shutdown if the controllers are closed after the HIDDeviceManager is shutdown
2020-03-13 13:05:32 -07: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
23a2b47790
Protect against NULL device in the Android hidapi implementation
2019-06-07 09:00:26 -07:00
Sam Lantinga
c4918db580
Add exception handling to Android hidapi.
2018-10-22 14:55:42 -07:00
Sam Lantinga
337cea4411
Fixed life-cycle issues with two activities sharing HIDDeviceManager
2018-10-08 12:49:30 -07:00
Sam Lantinga
7df0f4fdac
Fixed bug 4277 - warnings patch
...
Sylvain
Patch a few warnings when using:
-Wmissing-prototypes -Wdocumentation -Wdocumentation-unknown-command
They are automatically enabled with -Wall
2018-09-27 14:56:29 -07:00
Sam Lantinga
fb0e68ae0f
Fixed building with newer Android NDK
2018-09-25 08:23:57 -07:00
Sam Lantinga
f6a537cbfa
Store the API device refcount on the device itself, so if the device is disconnected and we have multiple application references to it, we only free it once.
2018-09-17 11:35:24 -07:00
Sam Lantinga
e8a0e35e24
Use atomic reference counting for the HID device object
2018-09-14 18:31:01 -07:00
Sam Lantinga
0d22559e30
Fixed Android build error
2018-08-21 10:25:30 -07:00
Sam Lantinga
4f41f07d43
Added missing files from previous commits
2018-08-09 16:05:48 -07:00