[patch] Low magnitudes with XInput haptics

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[patch] Low magnitudes with XInput haptics

Trent Gamblin
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.


Best regards,

Trent Gamblin

SDL mailing list
[hidden email]

xihaptic.diff (1K) Download Attachment