I’m trying to get rumble working. My test gamepad is an XBox One pad so I know it should be available. Since I want more than 4 gamepads I’m using the following initialization code:
SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC);
After I detect my GameController I’m trying to get the Haptic device. If I call:
Haptic = SDL_HapticOpen(DeviceID);
It fails and tells me there are 0 haptic devices available.
If I do
returns false. Am I missing a setup step?
What platform? Windows, Linux, macOS?
Windows. I’m actually trying to link to the SDL2 libraries within UE4. The example code is working fine, so it’s some conflict between UE4 and SDL2. For some reason the enumeration of haptic devices seems to be returning 0 devices.
I ran across a post form way back that Haptics seemed broken in DirectInput mode (I disable XInput since I want > 4 controllers). I’m wondering if these controllers (a mix XB360/XB1/Clones) just do not support haptics under DirectInput. Or if it’s a limitation of SDL2. SDL_InitSubSystem(SDL_INIT_HAPTIC) is returning successfully, but it shows no devices. So I’m leaning towards it being a controller issue. But I don’t have a controller that does to test.