After we initialize the joystick, we need to get the haptics device from the joystick using
SDL_HapticOpenFromJoystick on an opened joystick. If we manage to get the haptic device from
controller we have to initialize the rumble using SDL_HapticRumbleInit.

To actually make the controller rumble, you need to make it play some sort of rumbling. The easiest way to make your controller shake is by calling
SDL_HapticRumblePlay, which takes in the haptic device, strength in percentage, and duration of the rumble.
Here we make the controller rumble at 75% strength for half a second whenever a SDL_JoyButtonEvent happens.

Now the SDL 2 haptics API has many more features not covered here including making custom effects, handling multi rumble devices, and handling haptic mice. You can check them out
in the SDL 2 force feedback documentation.