Hello, I am developing in C# using SDL3 (via the wrapper ppy.SDL3-CS).
My controller supports vibration and is connected successfully.
I tried two different ways to start rumble:
-
Using
SDL_Joystick
+SDL_OpenHapticFromJoystick
+SDL_InitHapticRumble
+SDL_PlayHapticRumble
→ But this always fails,SDL_OpenHapticFromJoystick
returns NULL.
When I check the error withSDL_GetError
, it says: “Haptic: Joystick isn’t a haptic device.” -
Using
SDL_RumbleGamepad
(orSDL_RumbleJoystick
) directly on the openedSDL_Gamepad
→ This works correctly, the controller vibrates as expected.
So my questions are:
-
Is
SDL_OpenHapticFromJoystick
not supposed to work with modern gamepads? -
Is
SDL_IsJoystickHaptic
only for advanced/custom haptic effects, whileSDL_RumbleGamepad
is the standard way for simple rumble? -
The documentation says: “This function requires you to process SDL events or call SDL_UpdateJoysticks() to update rumble state.”
→ Why isSDL_UpdateJoysticks()
necessary for rumble? My script already has an event loop, but I am not sure if I am using it correctly.
Any clarification on the correct and recommended way to handle rumble in SDL3 would be greatly appreciated!
Thank you!