Commit Graph

26 Commits

Author SHA1 Message Date
Sam Lantinga
b91554ff4e Prevent the SPEEDLINK COMPETITION PRO joystick from switching into Android controller mode when enumerated over HID on Windows 10. 2019-08-22 15:58:00 -07:00
Ethan Lee
057397ee6b hidapi: Explicitly include locale.h, for setlocale 2019-08-06 23:08:01 -04:00
Ethan Lee
1036552fce Port libusb hid.c to SDL, add to MinGW configure 2019-08-04 00:01:38 -04:00
Ethan Lee
62b2efc9f2 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
Andrew Eikum
4d79d25f97 hidapi: Update repository URLs
Upstream hidapi has been re-homed. Update the repo URLs to help guide folks
where to contribute fixes.
2019-07-25 08:05:13 -05:00
Andrew Eikum
c7b8b49ef8 hidapi: Zero out new hid_device_info structs 2019-07-23 14:41:00 -05:00
Sam Lantinga
e2e6f78573 Fixed build error 2019-07-17 16:47:19 -07:00
Sam Lantinga
55fd028b86 Add linked list of opened HID devices to prevent accessing already freed devices in device removal callback that is sometimes called even after being unregistered 2019-07-17 16:47:13 -07:00
Jimb Esser
eec7834c4c Blacklist Corsair device causing hang 2019-07-14 16:48:31 -07:00
Sam Lantinga
05de5b19fd Protect against NULL device in the Android hidapi implementation 2019-06-07 09:00:26 -07:00
Sam Lantinga
21502d28f9 HIDAPI: fix bug that caused non-HID class parts of composite devices to have windows HID functions called on them. 2019-03-12 14:44:12 -07:00
Sam Lantinga
e6472f3cb3 Don't build SDL_JOYSTICK_HIDAPI by default on iOS
If you enable this, you'll need to link with CoreBluetooth.framework and add something like this to your Info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
2018-10-26 09:27:31 -07:00
Sam Lantinga
ddee9a366a Add exception handling to Android hidapi. 2018-10-22 14:55:42 -07:00
Sam Lantinga
130dae8a40 Fixed life-cycle issues with two activities sharing HIDDeviceManager 2018-10-08 12:49:30 -07:00
Ozkan Sezer
04357dc42b hidapi/windows/hid.c: comment out ntdef.h include after windows.h.
not necessary and can cause redefinition errors in some toolchains.
2018-09-28 13:44:10 +03:00
Ozkan Sezer
cfedb77376 hidapi/windows/hid.c: fix misplaced #if 0
VendorID && ProductID are only used by the test main(),
otherwise they are unwanted globals.
2018-09-28 11:04:55 +03:00
Sam Lantinga
890ade0074 Fixed mingw-w64 build 2018-09-28 01:00:47 -07:00
Sam Lantinga
f1173c73cb 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
8fbb4a7c28 Fixed building with newer Android NDK 2018-09-25 08:23:57 -07:00
Sam Lantinga
c37adc91b5 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
Ozkan Sezer
0839e5f252 do not export hidapi symbols from SDL dlls (bug #4259). 2018-09-15 14:28:10 +03:00
Sam Lantinga
f6e4a90c39 Use atomic reference counting for the HID device object 2018-09-14 18:31:01 -07:00
Sam Lantinga
605c269317 Removed dependency on C++ runtime on iOS 2018-08-21 19:42:19 -07:00
Sam Lantinga
433e09833f Fixed Android build error 2018-08-21 10:25:30 -07:00
Sam Lantinga
30509f97ac Fixed warnings building on Mac OS X 64-bit 2018-08-20 21:19:17 -07:00
Sam Lantinga
f06a191048 Added missing files from previous commits 2018-08-09 16:05:48 -07:00