src/joystick/hidapi/SDL_hidapi_steam.c


Log

Author Commit Date CI Message
Pierre Wendling d0bbfdbf 2022-12-01T16:07:03 Clang-Tidy fixes (#6725) (cherry picked from commit 3c501b963dd8f0605a6ce7978882df39ba76f9cd)
Sam Lantinga b8d85c69 2022-11-30T12:51:59 Update for SDL3 coding style (#6717) I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594 (cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
Sylvain Becker fb0ce375 2022-11-27T17:38:43 Cleanup add brace (#6545) * Add braces after if conditions * More add braces after if conditions * Add braces after while() conditions * Fix compilation because of macro being modified * Add braces to for loop * Add braces after if/goto * Move comments up * Remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements after merge * Fix inconsistent patterns are xxx == NULL vs !xxx * More "{}" for "if() break;" and "if() continue;" * More "{}" after if() short statement * More "{}" after "if () return;" statement * More fix inconsistent patterns are xxx == NULL vs !xxx * Revert some modificaion on SDL_RLEaccel.c * SDL_RLEaccel: no short statement * Cleanup 'if' where the bracket is in a new line * Cleanup 'while' where the bracket is in a new line * Cleanup 'for' where the bracket is in a new line * Cleanup 'else' where the bracket is in a new line (cherry picked from commit 6a2200823c66e53bd3cda4a25f0206b834392652 to reduce conflicts merging between SDL2 and SDL3)
Sam Lantinga 0dfc829a 2022-11-10T19:16:53 Added simple BLE Steam Controller support on all platforms This is still disabled by default via the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM
Sam Lantinga 5129a077 2022-10-14T14:35:52 Steam Controller support defaults off, as documented in SDL_hints.h
Sam Lantinga 5e3a4030 2022-09-27T11:36:01 Added sensor timestamp for Steam Controllers
Sam Lantinga 2c518747 2022-09-27T09:56:02 Added microsecond timestamp to sensor values for PS4 and PS5 controllers using the HIDAPI driver
Sam Lantinga fa2063fb 2022-09-22T23:42:25 Improved detection of third party PS4 and PS5 controllers
Sam Lantinga aa2e2f48 2022-09-22T18:22:17 Make sure HID devices can be opened before making them available to the application This prevents a number of issues where devices are enumerated but not actually able to be opened, like https://github.com/libsdl-org/SDL/issues/5781. We currently leave the devices open, allowing us to more easily do controller feature detection, protocol negotiation, detect dropped Bluetooth connections, etc. with the expectation that the application is likely to open the controllers shortly.
Sam Lantinga cdaafcec 2022-08-30T14:56:11 The Kinvoca Joy-Cons are handled by the Joy-Con driver, not the Switch Pro driver.
Sam Lantinga 52b6899a 2022-08-19T11:11:23 Added hints for more fine grained control over HIDAPI Xbox controller support
Sam Lantinga 68544be4 2022-06-10T11:31:59 Added support for the Nintendo Online controllers
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sylvain cb9f85e8 2021-11-22T11:18:01 Don't use "round", so that it's doesn't show up while searching for the function
Sylvain d31251b0 2021-11-21T22:30:48 use SDL's functions version inplace of libc version
Sam Lantinga 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
Cameron Gutman 1ccfbf96 2021-11-11T11:13:08 joystick: Convert HasLED() into a generic GetCapabilities() function
Sam Lantinga 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.
Sam Lantinga c501d159 2021-10-03T14:10:21 Fixed range for Steam Controller sensor values
Sam Lantinga ea1a2b94 2021-10-02T09:12:57 Use the correct update rate for Steam Controller sensors
Sam Lantinga 8b745752 2021-10-01T21:32:21 Added support for the gyro and accelerometer on Steam Controllers Fixes https://github.com/libsdl-org/SDL/issues/4577
Sam Lantinga 7ed7644a 2021-09-07T17:37:47 Fixed compiling HIDAPI Steam Controller support with C89 compiler
Sam Lantinga d135c076 2021-07-08T13:22:41 Added SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow applications to send custom effects to the PS4 and PS5 controllers See testgamecontroller.c for an example of a custom PS5 trigger effect
Sam Lantinga e2f46ed8 2021-01-14T23:49:20 Always lock the HIDAPI device when closing, in case rumble is pending
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga 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.
Sam Lantinga fcb21aa8 2020-11-17T10:30:20 Added API for sensors on game controllers Added support for the PS4 controller gyro and accelerometer on iOS and HIDAPI drivers Also fixed an issue with the accelerometer on iOS having inverted axes
Sam Lantinga 83b653d5 2020-11-11T20:09:56 Fixed build warning
Sam Lantinga 009b62f1 2020-11-07T02:22:15 Be explicit about mapping the new game controller paddle buttons
Sam Lantinga 3a3aaac2 2020-11-06T11:30:52 Added 4 auxiliary buttons to the game controller API Xbox Elite controllers use AUX1-AUX4 to represent the paddle buttons when using the HIDAPI driver PS4 and PS5 controllers use AUX1 to represent the touchpad button Nintendo Switch Pro controllers use AUX1 to represent the capture button
Sam Lantinga e555d453 2020-11-05T11:07:54 Added SDL_JoystickHasLED Currently, this is only supported by the PS4 HIDAPI driver.
Ethan Lee 83cddd2e 2020-04-30T11:57:29 Add SDL_JoystickSetLED. Currently, this is only supported by the PS4 HIDAPI driver.
Sam Lantinga b6afbe63 2020-04-07T09:38:57 Added SDL_log.h to SDL_internal.h so logging is available everywhere
Sam Lantinga 9b879a08 2020-03-16T19:15:28 Fixed compiler warning
Jimb Esser c2c5d0b3 2020-03-16T16:52:49 Fix compile error
Sam Lantinga 52be6633 2020-03-02T09:35:09 Use SDL math functions in Steam Controller support
Sam Lantinga 6efebf17 2020-02-04T12:48:53 Moved rumble expiration to the main joystick handling level, and prevent sending the driver layer duplicate rumble requests.
Sam Lantinga 212609b3 2020-01-31T14:09:23 Map the right pad on the Steam Controller to the right stick in the game controller API
Sam Lantinga 0641711e 2020-01-29T20:09:59 Added missing file from previous commit