SDL_HapticOpen & SDL_HapticOpenFromJoystick producing differnet results


I have a generic Chinese made game controller which works well, but I’m having issues getting rumble working.

When I use SDL_HapticOpenFromJoystick, I get a valid SDL_Haptic pointer, but a call to SDL_HapticRumbleInit gives error “Haptic error Unable to create effect”, and so then SDL_HapticRumblePlay gives an error also.

However, if I use SDL_HapticOpen, then SDL_HapticRumbleInit, then SDL_HapticRumblePlay works.

Possible bug?

If I use SDL_HapticOpen, the device index I pass is not the the same index I used for SDL_JoystickOpen, so how can I know which haptic index is related to which joystick index?