src/joystick/hidapi


Log

Author Commit Date CI Message
Sam Lantinga c6817a2c 2020-01-16T15:32:41 Added support for the paddles on the Xbox One Elite Series 2 controller
Sam Lantinga 4e1cc124 2020-01-16T15:32:39 Improved Xbox One controller initialization
Sam Lantinga 669729a8 2020-01-15T22:18:31 Improved Xbox One controller initialization sequence This sequence works across Microsoft, PowerA, PDP, and HORI controllers. The newer Microsoft XBox firmware requires synchronizing the rumble sequence number, when SDL sees it after the initial connect The Razer Wildcat controller requires waiting for init responses before continuing the initialization sequence. The PDP Battlefield 1 controller takes over a second to be ready for initialization, and if initialization is attempted before then, it will fail.
Sam Lantinga 7775f7ce 2020-01-13T22:05:54 Fixed deadlock in HIDAPI joystick system
Sam Lantinga 3a796d6a 2020-01-13T15:35:54 Free the joystick player index when the joystick is removed
Sam Lantinga d2cda502 2020-01-12T17:22:24 Send the full Xbox One controller sequence for Microsoft controllers This switches Bluetooth controllers back into USB report mode for the latest Xbox One S and Xbox One Elite Series 2 firmware
Sam Lantinga 5d28c315 2020-01-09T14:53:34 Only initialize Xbox One controllers once they're ready for initialization (or if they are silent until init) This fixes the Hyperkin Duke Xbox One controller showing the Xbox startup animation every time an SDL application launches
Sam Lantinga 47abe4e3 2020-01-09T14:53:30 Fixed crash when unplugging a HIDAPI controller
Sam Lantinga a56aaea1 2020-01-07T16:47:56 Fixed handling the 8BitDo M30 in Nintendo Switch mode
Sam Lantinga 4c9628a0 2019-12-30T17:56:56 Fixed GameCube controller axis and trigger ranges and X and B button being swapped
Sam Lantinga a9482a1d 2019-12-30T09:44:32 Added support for the Nintendo GameCube adapter, tested on Steam Link hardware
Zack Middleton f0cee3ed 2019-12-22T13:15:11 Fix shutting down HIDAPI device with multiple joysticks Using Wii U GameCube USB adapter with multiple controllers attached and restarting SDL input in a game results in extra joysticks with NULL name. HIDAPI_CleanupDeviceDriver() shut down joysticks by iterating through device->num_joysticks but each HIDAPI_JoystickDisconnected() decreases device->num_joysticks and shifts joysticks array down. Resulting in only half of controllers being shutdown. It worked with only 1 controller attached though. Disconnect HIDAPI device joystick 0 until there are none left.
Sam Lantinga 46e1377d 2019-12-20T20:12:03 Automatically assign player indexes to game controllers, and allow changing the player index for game controllers and joysticks. Added the functions SDL_JoystickFromPlayerIndex(), SDL_JoystickSetPlayerIndex(), SDL_GameControllerFromPlayerIndex(), and SDL_GameControllerSetPlayerIndex()
Sam Lantinga 6b767872 2019-12-19T21:45:44 Make sure the Xbox 360 driver doesn't try to talk to the wireless controllers
Sam Lantinga 1db56619 2019-12-19T18:03:28 Fixed rare infinite rumble in HIDAPI controller driver
Sam Lantinga 25bd5070 2019-12-19T18:00:08 Fixed GameCube rumble
Sam Lantinga 2481ab93 2019-12-19T15:58:16 Fixed compiler warning
Sam Lantinga fead0b24 2019-12-19T15:02:12 Added missing files from previous commits
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 15d30298 2019-12-19T15:01:32 Added support for wireless Xbox 360 controllers using the HIDAPI driver
Sam Lantinga e7f7e3f4 2019-12-19T15:01:30 Refactored HIDAPI controller code to support dongles and hubs that dynamically attach controllers
Sam Lantinga 52b6ab21 2019-12-16T17:11:23 Added support for the SteelSeries Stratus Duo
Sam Lantinga a7ae9175 2019-12-16T10:20:03 Fixed bug 4898 - No rumble because of integer overflow in SDL_JoystickRumble meyraud705 On a Dualshock 4 controller using hidapi driver, calling SDL_JoystickRumble with a duration too long (SDL_HAPTIC_INFINITY for example) causes the rumble to stop immediately. This happens because of integer overflow on line 301 of SDL_hidapi_ps4.c (https://hg.libsdl.org/SDL/file/a3077169ad23/src/joystick/hidapi/SDL_hidapi_ps4.c#l301), which sets expiration time in the past.
Sam Lantinga c2b6d6f9 2019-12-13T16:12:37 Enable the LED on PowerA Xbox One controllers
Sam Lantinga 0352814a 2019-12-13T16:07:25 Added general remapping of controller manufacturer
Sam Lantinga 1ac7eaba 2019-12-12T14:25:02 Fixed comment typo
Sam Lantinga 0f529160 2019-12-11T17:47:01 Added custom names for some controllers
Sam Lantinga e029fdbb 2019-12-11T17:46:59 Shorten "Performance Designed Products" to "PDP"
Sam Lantinga 8b50dcb2 2019-12-11T17:46:54 Use the controller product string instead of hard-coding controller names
Sam Lantinga 3469481e 2019-12-10T10:00:49 Don't include the manufacturer if it's already included in the product string
Sam Lantinga 82d2c357 2019-12-09T16:52:11 Fixed rumble after Xbox controller initialization When we initialize the controller it has an internal rumble sequence number, and if our rumble sequence number doesn't match that, rumble won't happen. To fix that we cycle through the range of sequence numbers, and at some point we'll match up with the controller's sequence number and it'll roll forward until it matches our next rumble sequence number.
Sam Lantinga 3d34750c 2019-12-09T13:54:05 The PowerA Mini controller blocks while writing feature reports, so don't try to use the HIDAPI driver for it on Linux
Sam Lantinga 36265063 2019-12-09T13:54:03 Added some missing Xbox controller names
Sam Lantinga 2fd3f756 2019-11-28T11:44:17 Fixed trying to use the HIDAPI driver for the original Xbox One S Bluetooth controller
Sam Lantinga 4a776138 2019-11-27T18:26:57 Added the full Xbox One Elite Series 2 controller initialization sequence, to start input reports after switching out of Bluetooth mode.
Sam Lantinga 0b863f8a 2019-11-27T15:27:19 Sorted controller entries by type and VID/PID to more easily find entries in the list
Sam Lantinga 43cb7b3c 2019-11-27T12:38:51 Added support for the Hori Fighting Commander
Sam Lantinga a76e5474 2019-11-27T12:38:48 Added support for the PowerA XB1 Fusion Fight Pad
Sam Lantinga a5e6b87c 2019-11-26T08:35:41 Added support for a variant of the PowerA FUSION Pro Controller
Sam Lantinga f3d95396 2019-11-25T15:02:54 Added some missing controller names
Sam Lantinga 8243a3e8 2019-11-25T15:02:50 Added support for the Hyperkin X91
Sam Lantinga 8e153922 2019-11-22T17:46:30 This packet didn't end up being needed to initialize input for the Xbox One Elite Series 2 controller
Sam Lantinga 733f2525 2019-11-22T14:09:24 Fixed build
Sam Lantinga b5aff9d7 2019-11-22T13:12:12 Added SDL_GameControllerTypeForIndex() and SDL_GameControllerGetType() to return the type of controller attached.
Sam Lantinga c0650aca 2019-11-21T14:04:48 Added support for the PDP Battlefield One controller
Sam Lantinga 68d8fc5c 2019-11-18T15:46:13 Added support for the Xbox One Elite Series 2 controller in wired mode
Sam Lantinga 1e24a151 2019-11-18T11:51:39 Added names for some missing Xbox controllers
Sam Lantinga 14495644 2019-11-18T11:44:51 Added identifiers for the Xbox One Elite Series 2 controller
Sam Lantinga a9ac9e38 2019-11-16T19:58:29 Don't try to use this driver with the Xbox One S in Bluetooth mode on Linux
Sam Lantinga 9ca53730 2019-11-16T19:55:53 Added support for the Xbox One S controller in Bluetooth mode on Linux
Sam Lantinga cf33f1f0 2019-11-13T21:53:01 Added a utility function to simplify the hint handling logic
Sam Lantinga 9a76bebf 2019-11-13T14:24:48 SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS defaults to true, to match Steam's default behavior
Sam Lantinga 9da4bfc1 2019-10-22T10:57:07 Added support for the Power A Nintendo Switch Enhanced Wireless Controller
Sam Lantinga b3470f04 2019-10-17T17:32:47 Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to control whether Nintendo Switch controllers use their button labels or button positions for game controller button reporting.
Sam Lantinga e6ac16ef 2019-10-17T16:59:05 Added support for third party Nintendo Switch controllers that don't support the full protocol
Sam Lantinga 3b3dbb5a 2019-10-01T08:50:04 Removed unused volume check interval
Sam Lantinga cbde0ffa 2019-09-19T16:50:49 The PS4 is ignoring the volume values in the report, so we don't need to fill them in.
Sam Lantinga c10a8742 2019-07-31T10:20:37 Make sure HIDAPI is initialized whenever we call HIDAPI_IsDevicePresent()
Andrew Eikum c172f36b 2019-07-31T11:14:48 joystick: Ensure HIDAPI is initialized before calling it
Sam Lantinga dc714389 2019-07-25T15:21:44 Don't call hid_enumerate() if the HIDAPI drivers are all disabled
Sam Lantinga be6cda9f 2019-06-19T15:54:21 Rolling back GameCube HIDAPI support It causes the HIDAPI devices to always be opened on enumeration, which causes crashes in the Windows drivers when multiple applications are reading and writing at the same time. We can revisit this after 2.0.10 release.
Zack Middleton 56e2b9a4 2019-06-19T06:43:54 Handle GameCube WaveBird controller differences Make wireless GameCube controllers use unknown power level instead of wired and don't allow rumble (it doesn't have hardware for it).
Zack Middleton 6f63c1c3 2019-06-19T06:43:36 Make GameCube controllers only rumble if both USB cables are connected The Nintendo USB GameCube Adapter has two USB connectors. Black for data and grey for additional power for rumble. The Wii U and other software require both cables to use rumble. The rumble is weaker without the second USB cable. Other than that I don't know if there is any negative side affects from using rumble with only one cable.
Sam Lantinga d97387cc 2019-06-08T14:32:19 Fixed bug 4600 - Dualshock 4 touchpad press is not detectable with SDL_JoystickGetButton Dexter Friedman When using a Dualshock 4 controller (model numbers CUH-ZCT1U and CUH-ZCT2U), pressing anywhere on the center touchpad does not send an SDL_JOYBUTTONDOWN event. I have verified this with testjoystick: Repro steps: 1. Plug in a DS4 over USB 2. Compile testjoystick and run: testjoystick.exe 0 3. Press and hold the touchpad. Observe that no lime green box appears Expected behavior: A lime green box appears while the touchpad is pressed. Notes: I've attached a patch here that works on my PC and produces the expected behavior in testjoystick, for both DS4 model numbers I listed earlier. If I understand correctly, by exposing this as a joystick button, the gamecontroller API mapping can be modified with a change to gamecontrollerdb.txt in the future.
Zack Middleton 82af4276 2019-06-08T13:36:59 hidapi: Use GameCube adapter controller port for player index The Nintendo USB GameCube adapter has four controller ports. Return the port number as 0 to 3 from SDL_JoystickGetPlayerIndex() and SDL_JoystickGetDevicePlayerIndex().
Cameron Gutman 5cb14f44 2019-04-30T20:37:49 Ignore Xbox One S gamepads with older firmware in HIDAPI This older firmware had a different HID report style that we don't support.
Ethan Lee f07c992b 2019-03-17T12:36:40 hidapi: Add GCN L/R buttons, just in case someone wants them...
Ethan Lee c5286156 2019-03-12T20:27:54 hidapi: Add support for Wii U/Switch USB GameCube controller adapter. Note that a single USB device is responsible for all 4 joysticks, so a large rewrite of the DeviceDriver functions was necessary to allow a single device to produce multiple joysticks.
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sam Lantinga 14c55ac8 2018-10-26T20:20:28 This change looks okay in the general case. If we run into problems where these events aren't dispatched (initialized on a different thread than the main thread?) we may need to create a separate thread to handle device notifications like we do with the windows joystick subsystem.
Ryan C. Gordon be8ef94f 2018-10-26T14:43:39 hidapi: Don't run a separate event loop for device notifications. Fixes Bugzilla #4286.
Sam Lantinga 14329256 2018-10-25T16:53:14 Generalized the XInput user index into a player index
Sam Lantinga f01cdced 2018-10-05T01:41:59 It turns out HIDAPI for Xbox controllers doesn't allow background input, so we won't enable it by default on Windows.
Sam Lantinga 19445561 2018-10-02T20:51:33 Make sure we don't read and write to HIDAPI at the same time, it's not thread-safe on Windows
Ozkan Sezer fde82e59 2018-09-28T14:01:40 SDL_hidapi_ps4.c: add HAVE_ENDPOINTVOLUME_H check to win32 volume code. this makes it build with my old toolchain with mingw-w64 1.0.10 headers
Sam Lantinga 9aa8a75d 2018-09-28T01:18:54 Fixed building with Xcode 10.0
Sam Lantinga f964ce03 2018-09-28T01:00:47 Fixed mingw-w64 build
Ozkan Sezer 870c44bf 2018-09-25T09:20:56 safer this way, just in case..
Sam Lantinga cd90e2ca 2018-09-24T16:33:14 Fixed bug 4267 - linkage failure with --enable-hidapi because of missing libudev symbols Ozkan Sezer hidapi dynamic udev initial patch
Sam Lantinga d07fe7ad 2018-09-21T09:41:21 Removed button logging message
Sam Lantinga e8b0859f 2018-09-20T15:55:52 Added missing call to WindowsDeleteString()
Sam Lantinga 600126c9 2018-09-19T10:03:40 Added experimental support for Windows.Gaming.Input
Sam Lantinga 6a7b0c27 2018-09-14T12:41:29 Fixed crash launching under Steam on Mac OS X
Ozkan Sezer 33381d3d 2018-09-07T11:03:24 hidapi/SDL_hidapijoystick.c: fix build in C90 mode: src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_InitializeDiscovery': src/joystick/hidapi/SDL_hidapijoystick.c:281: error: 'true' undeclared (first use in this function) src/joystick/hidapi/SDL_hidapijoystick.c:281: error: (Each undeclared identifier is reported only once src/joystick/hidapi/SDL_hidapijoystick.c:281: error: for each function it appears in.) src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_UpdateDiscovery': src/joystick/hidapi/SDL_hidapijoystick.c:339: error: 'true' undeclared (first use in this function) src/joystick/hidapi/SDL_hidapijoystick.c:341: error: ISO C90 forbids mixed declarations and code
Sam Lantinga 80021c21 2018-09-05T15:28:06 Speculatively disable rumble on the Razer Panthera Evo, which doesn't have rumble motors and probably hangs in the same way the Panthera does.
Sam Lantinga c152e380 2018-09-05T11:18:50 Added support for the Razer Panthera Fightstick Fixed bindings for the Mad Catz FightStick TE S+
Sam Lantinga 34237b80 2018-08-31T18:10:21 Better fix to make sure we're only returning controllers from the HIDAPI joystick API
Sam Lantinga 5ef8eb49 2018-08-29T20:55:02 Don't show the Razer Raiju sound interface as a game controller
Sam Lantinga 207428b4 2018-08-29T20:23:39 Don't rumble Bluetooth PS4 controllers by default, as that switches the controller into extended input report mode, which breaks games that use DirectInput.
Sam Lantinga 16ccff3c 2018-08-29T20:23:36 Fixed whitespace
Sam Lantinga fda14741 2018-08-29T18:56:54 Fixed Xbox One S Bluetooth support on Mac OS X
Ozkan Sezer 90454b1e 2018-08-16T11:01:02 SDL_hidapi_ps4.c: define NTDDI_VISTA / _WIN32_WINNT_VISTA if not defined it still needs a Vista or newer Platform SDK to build, though.
Sam Lantinga 7d3a7ef8 2018-08-15T23:35:54 Use a single hint for both Xbox 360 and Xbox One controllers, since they are often the same driver.
Sam Lantinga a2add1f6 2018-08-15T23:14:45 Use the HIDAPI driver for Xbox controllers on Windows, and determine the XInput mapping at runtime for extended functionality like rumble and guide button.
Sam Lantinga 3f5ff751 2018-08-15T23:14:43 Use a unified name list for Xbox 360 and Xbox One controllers for drivers that can handle both
Sam Lantinga aad340eb 2018-08-15T19:53:36 Added Windows Xbox controller state packet handling, for completeness.
Sam Lantinga 63107524 2018-08-15T19:53:34 Fixed input from the Steam Virtual Gamepad on Mac OS X
Sam Lantinga 0903e835 2018-08-15T19:53:31 Use SDL specific window class to avoid conflicting with Steam
Sam Lantinga c8866658 2018-08-15T19:53:30 Catch device removal as well as device arrival on Windows
Sam Lantinga 641c674f 2018-08-15T19:53:28 Turned off debug messages