src/joystick/hidapi/SDL_hidapi_rumble.c


Log

Author Commit Date CI Message
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 6875e62a 2022-11-06T01:15:20 Make sure we don't send Xbox controllers rumble so quickly that it overwhelms the firmware Fixes https://github.com/libsdl-org/SDL/issues/6435
Sam Lantinga 38af459d 2022-11-06T01:15:19 Fixed potential clobbering of packets of different types using SDL_HIDAPI_SendRumble()
Cameron Cawley 0cca71a8 2022-05-18T22:12:05 Use SDLCALL for callbacks in public APIs
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
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 d0b87fed 2021-01-14T23:49:27 Added HIDAPI rumble debug info
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga 480c1f9f 2021-01-01T11:12:36 Make sure we're not starving report reads when there's lots of rumble
Sam Lantinga cb361896 2020-12-09T07:16:22 Fixed bug 5235 - All internal sources should include SDL_assert.h Ryan C. Gordon We should really stick this in SDL_internal.h or something so it's always available.
Sam Lantinga c9723c40 2020-12-07T09:38:21 Fixed potential hang in joystick close if the rumble thread is blocked for some reason It's still possible to hang when shutting down, if the rumble thread is still hung, but it won't block indefinitely at runtime.
Sam Lantinga 549010f2 2020-11-20T13:24:49 It takes 2 packets to stop audio haptics and start emulated rumble on the PS5 controller
Sam Lantinga 428cfddb 2020-03-04T14:59:44 Fixed crash when a controller is disconnected while rumble is pending
Sam Lantinga 81256207 2020-02-07T11:02:34 Update for bug 4923 - Calling SDL_GameControllerRumble() often takes 8 ms meyraud705 Dualshock4 on bluetooth need 78 bytes for the rumble data while SDL_HIDAPI_RumbleRequest can only hold 64 bytes. 'volatile' is not meant for thread synchronization. The list of rumble request could grow infinitely if user call SDL_JoystickRumble too much. The documentation says "Each call to this function cancels any previous rumble effect", so overwriting pending request seem like a good idea.
Sam Lantinga 1d1a35ef 2020-02-04T16:05:39 Fixed Visual Studio build
Sam Lantinga 1bd12026 2020-02-04T15:42:49 Added SDL_hidapi_rumble.c to the macOS, iOS and tvOS builds
Sam Lantinga 02108cf7 2020-02-04T15:27:25 Added missing files from previous commit