Sam Lantinga
2385dc6297
Added support for the Flydigi Vader 5 Pro in Xbox 360 mode
2026-02-24 10:18:17 -08:00
Sam Lantinga
4e2fd57e77
Fixed initializing the PowerA OPS v1 Wireless Controller
2026-02-11 16:54:18 -08:00
Sam Lantinga
d33642b710
Filter libusb devices early in enumeration
...
Some device drivers crash if you query things like manufacturer and product name, so make sure we only touch devices that we're really interested in.
2025-12-30 10:52:56 -08:00
Sam Lantinga
404ec13fbb
Fixed building with libusb on FreeBSD
2025-10-24 10:41:08 -07:00
Sam Lantinga
5503fe1c1b
Fixed a memory leak in fill_device_info_usage() (thanks @digant73)
...
Fixes https://github.com/libsdl-org/SDL/issues/13998
2025-09-20 09:05:37 -07:00
Sam Lantinga
7c8df4ea52
Fixed warnings building with Visual Studio
2025-08-30 10:15:58 -07:00
Sam Lantinga
ac5ccbe386
Moved Nintendo Switch 2 Controller initialization from hid.c to SDL_hidapi_switch2.c
2025-08-28 09:10:47 -07:00
Sam Lantinga
2bb51e1340
Claim the interface before doing bulk transfers
2025-08-28 09:10:47 -07:00
Ethan Lee
a798da2ec7
hidapi: Add support for NSO GameCube controller via libusb.
...
Thanks to Nohzockt for the initial libusb init and hidapi polling work!
2025-08-28 09:10:47 -07:00
Sam Lantinga
92e8224d32
Fixed build
2025-07-11 13:05:37 -07:00
Sam Lantinga
0b2e389ee3
Fixed long delay when enumerating the Razer Huntsman keyboard
...
Fixes https://github.com/libsdl-org/SDL/issues/13236
2025-07-11 12:34:14 -07:00
Ozkan Sezer
81e3066303
hidapi/libusb: disable C5287 warning in MSVC builds
...
A quick search implies that it is a bogus warning:
https://www.google.com/search?q=visual+studio+C5287
2025-06-21 07:15:53 -07:00
Sam Lantinga
1e6a25324c
Added support for the PowerA Battle Dragon Advanced Wireless Controller
2025-05-02 10:01:13 -07:00
Vicki Pfau
00f3a82ada
Joystick: Add new GIP driver to replace old Xbox One wired driver
...
This new driver is based on official documentation released by Microsoft in
September, though it still lacks several important features, notably the
Security handshake for wireless dongles and audio support. It is, however, more
reliable and extensible than the old driver.
2025-05-01 11:04:33 -07:00
Petar Popovic
457d0edeaf
Remove some extra semicolons
2024-09-26 20:01:56 +03:00
Amir
5db08b86ca
Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"
...
https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.
2024-07-17 14:09:11 -07:00
Anonymous Maarten
1664ac4fcb
hidapi: fix 'conversion from 'size_t' to 'int', possible loss of data' of libusb functions
2024-07-10 20:27:39 +02:00
Sam Lantinga
a04596c9a7
Added support for the ROG RAIKIRI
2024-07-03 13:54:00 -07:00
Ozkan Sezer
aaba01aee4
hidapi: syncing with mainstream:
...
- macos, pthread_barrier_wait: properly check the wait condition
- windows: Assert that struct has the correct size
- windows: Fix printf/string-related issues
- other miscellaneous stuff irrelevant in SDL. (for symmetry...)
2023-11-23 11:35:02 +03:00
Sam Lantinga
0b460f34ba
The HP HyperX controllers have a share button
2023-11-03 14:47:20 -07:00
Sam Lantinga
23ceae94c9
Fixed Xbox 360 Controller support using libusb on Linux
2023-10-25 14:50:07 -07:00
Sam Lantinga
f52b330ed8
Added support for the HP HyperX Clutch Gladiate controller
2023-10-25 09:00:26 -07:00
Sam Lantinga
9301f7ace2
hidapi/libusb: only enumerate each interface once
...
If a device has multiple altsettings, like an Xbox Series X controller, make sure we only enumerate each interface once, not once for each altsetting.
2023-09-15 05:07:05 -07:00
Ozkan Sezer
3b1d1e4e31
hidapi: sync the hidraw changes with mainstream
...
Apply mainstream commit 8a4de63b (mainstream PR/601) to our hidapi.
The patch is a direct apply of the mentioned commit, with one sdl-
specific part guarded by HIDAPI_IGNORE_DEVICE adapted accordingly.
2023-08-26 08:09:10 -07:00
Ozkan Sezer
40ac818bf8
hidapi: sync with mainstream (typo fixes)
2023-07-19 00:40:10 +03:00
Sam Lantinga
6e7769cde1
Fixed detecting Bluetooth Steam Controllers
2023-06-05 19:52:00 -07:00
Ozkan Sezer
3ecdbf27cc
hidapi: silence redefinition warnings
2023-06-02 07:25:02 -07:00
Sam Lantinga
f082c68b2f
Updated with upstream suggestions in https://github.com/libusb/hidapi/pull/582
2023-06-01 10:48:15 -07:00
Sam Lantinga
b36679b90e
Updated with upstream suggestions in https://github.com/libusb/hidapi/pull/582
2023-06-01 08:27:56 -07:00
Sam Lantinga
20182eed7c
Updated with upstream suggestions in https://github.com/libusb/hidapi/pull/572
2023-06-01 07:47:28 -07:00
Sam Lantinga
0ffeca8a1c
Added SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS to control whether SDL_hid_enumerate() enumerates all HID devices or only controllers.
...
By default SDL will only enumerate controllers, to reduce risk of hanging or crashing on devices with bad drivers and avoiding macOS keyboard capture permission prompts.
2023-05-27 10:51:52 -07:00
Sam Lantinga
1c9aae9a29
hidapi build fixes for the upstream build environment
2023-05-26 22:50:39 -07:00
Sam Lantinga
007c36e513
Added SDL_HINT_HIDAPI_IGNORE_DEVICES to specify devices that should be ignored in SDL_hid_enumerate()
2023-05-26 08:19:04 -07:00
Sam Lantinga
57b33aec01
hidapi/libusb: allow building on Windows, using the SDL C runtime
...
Signed-off-by: Sam Lantinga <slouken@libsdl.org >
2023-05-26 08:19:04 -07:00
Sam Lantinga
daccd7289b
hidapi/libusb: added quirks for the Sony PS3 controller
...
Signed-off-by: Sam Lantinga <slouken@libsdl.org >
2023-05-26 08:19:04 -07:00
Sam Lantinga
3b06d64dc3
hidapi/libusb: enable support for Xbox 360 and Xbox One controllers
...
Signed-off-by: Sam Lantinga <slouken@libsdl.org >
2023-05-26 08:19:04 -07:00
Sam Lantinga
e2ec976735
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 >
2023-05-26 08:19:04 -07:00
Sam Lantinga
04e686c52f
hidapi/libusb: use LIBUSB_CALL for the read_callback function
...
Signed-off-by: Sam Lantinga <slouken@libsdl.org >
2023-05-26 08:19:04 -07:00
Sam Lantinga
5de35a1d77
hidapi/libusb: use the same logic to get the config descriptor in hid_open_path() as in hid_enumerate()
...
Signed-off-by: Sam Lantinga <slouken@libsdl.org >
2023-05-26 08:19:04 -07:00
Sam Lantinga
003a9b9666
Added interface_class, interface_subclass, and interface_protocol to USB device info
...
Currently only filled in for libusb
2023-05-26 08:19:04 -07:00
Sam Lantinga
651d9c4a6e
Fixed compiling hidapi in SDL build environment
2023-05-26 08:19:04 -07:00
Sam Lantinga
3b7b8f3c09
Updated hidapi to 0.14.0 release
...
Upstream: https://github.com/libusb/hidapi/releases/tag/hidapi-0.14.0
2023-05-26 08:19:04 -07:00
Sam Lantinga
2e6c48dcb4
Added support for the GameSir-G7 Controller for Xbox
2023-05-11 17:44:56 -07:00
Sam Lantinga
87ad71f9b2
Rename SDL mutex, semaphore and condition variable types to match SDL 3.0 naming convention
2023-04-28 12:08:33 -07:00
Sam Lantinga
61c0c009ab
Rename SDL semaphore and condition variable functions to match SDL 3.0 naming convention
...
Fixes https://github.com/libsdl-org/SDL/issues/7642
2023-04-28 12:08:33 -07:00
Sam Lantinga
a4b4dff4a2
Added support for the Astro C40 in Xbox 360 mode
2023-04-27 17:10:44 -07:00
Anonymous Maarten
b6ae281e97
Use #ifdef/#ifndef instead of #if defined/#if \!defined
2023-03-30 21:35:01 +00:00
Sam Lantinga
5fded632d6
Added support for the Turtle Beach REACT-R and Recon Xbox controllers
2023-02-06 20:14:12 -08:00
Sam Lantinga
dacdb1c310
Added support for the ThrustMaster eSwap PRO Controller Xbox
2023-01-03 15:12:18 -08:00
Sam Lantinga
c5790359fd
Added precompiled header support for Visual Studio and Xcode ( #6710 )
...
Fixes https://github.com/libsdl-org/SDL/issues/6704
2022-11-29 18:34:15 -08:00