The gamepad API currently uses the SDL2 haptics API for controller rumble effects.
Since SDL 2.0.9, there's been a simpler SDL_GameControllerRumble API that is less buggy and works with a wider array of controllers. However, I originally ran into linking issues when I tried to migrate to this, so I rolled it back.
However, further investigation has shown that the linking issues are Windows-specific and only apply to old versions of SDL2, so I'm more confident in making this change now.
Motivation/Examples
My only controller is a DualShock 4, and last time I checked I had to use DS4Windows (a third-party XInput driver) to make rumble work with it. I believe when I tested out SDL_GameControllerRumble, I was able to get rumble working 'out of the box'.
Summary
The gamepad API currently uses the SDL2 haptics API for controller rumble effects.
Since SDL 2.0.9, there's been a simpler
SDL_GameControllerRumble
API that is less buggy and works with a wider array of controllers. However, I originally ran into linking issues when I tried to migrate to this, so I rolled it back.However, further investigation has shown that the linking issues are Windows-specific and only apply to old versions of SDL2, so I'm more confident in making this change now.
Motivation/Examples
My only controller is a DualShock 4, and last time I checked I had to use DS4Windows (a third-party XInput driver) to make rumble work with it. I believe when I tested out
SDL_GameControllerRumble
, I was able to get rumble working 'out of the box'.Alternatives Considered
We could leave things as they are.