Discussion:
[SDL] [patch] Low magnitudes with XInput haptics
Trent Gamblin
2017-05-27 04:44:38 UTC
Permalink
I recently tried the haptics support on a couple joysticks. One worked seemingly fine (an Xbox 360 pad) while the
other (Logitech F710) I can barely detect a rumble using the basic rumble support (SDL_RumbleInit etc.) I dug through
the code a little and found that although SDL_HapticEffect has a max magnitude of 32767, XInput expects max to be
65535[1]. I attached a patch. I'm not certain it's completely correct as I didn't quite understand what "180 degree
phase shift" for negative magnitudes means, but with positive values this makes my gamepad move.

[1]https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.reference.xinput_vibration(v=vs.85).aspx

Best regards,

Trent Gamblin

Loading...