diff options
| author | GideonSerf <[email protected]> | 2024-02-24 17:47:27 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-24 16:47:27 +0100 |
| commit | 371d25c8c99f6db487c938f8b7f391d45e26d3a4 (patch) | |
| tree | bc4600ada3abc9f74420e3d00b36a3b38ccd22f5 /src/platforms/rcore_web.c | |
| parent | bda919033dfdd2d0d75b606f3fa29d21f0408ffb (diff) | |
| download | raylib-371d25c8c99f6db487c938f8b7f391d45e26d3a4.tar.gz raylib-371d25c8c99f6db487c938f8b7f391d45e26d3a4.zip | |
Gamepad rumble support with SDL2 (#3819)
* Added gamepad rumble to rcore_desktop.c and rcore_desktop_sdl.c
Still need to add to the rest of the platforms.
* Add SetGamepadVibration warnings to unimplemented platforms.
* Added MAX_GAMEPAD_VIBRATION_TIME
The rumble in SDL2 will continue for MAX_GAMEPAD_VIBRATION_TIME unless the user cancels it with a call to SetGamepadVibration(0.0f,0.0f,0.0f)
* Cast float duration value to Uint 32
* Changed defines from int to float and fixed typo
---------
Co-authored-by: Gideon Serfontein <[email protected]>
Diffstat (limited to 'src/platforms/rcore_web.c')
| -rw-r--r-- | src/platforms/rcore_web.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index a13f6990..9328b8c9 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -850,6 +850,12 @@ int SetGamepadMappings(const char *mappings) return 0; } +// Set gamepad vibration +void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor) +{ + TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform"); +} + // Set mouse position XY void SetMousePosition(int x, int y) { |
