We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3002 - DirectInput haptics don't work on Logitech F710
Summary: DirectInput haptics don't work on Logitech F710
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: haptic (show other bugs)
Version: 2.0.3
Hardware: x86_64 Windows 8
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 00:13 UTC by hemimg
Modified: 2017-06-21 05:22 UTC (History)
3 users (show)

See Also:


Attachments
Fix (864 bytes, patch)
2017-06-03 20:49 UTC, Trent Gamblin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hemimg 2015-06-05 00:13:05 UTC
I bought a Logitech F710 just to test out the haptic support for DirectInput in SDL, and sadly it does not work. Testhaptic.exe detects the effects and tries to play a sine effect, but errors out saying that the effect cannot be created. Basic rumble does work when the device is in XInput mode, so I'm guessing it isn't a problem with the joystick. I have the Logitech Gaming Software installed and haptics work in their test as well. 

I also tried nabbing the latest code from the HG repository from after the separation of the DInput and XInput code, but that failed as well. The problem seems to be in the CreateNewEffect call to DirectInput that errors out with an INVALIDPARAM.
Comment 1 Joe Thompson 2015-06-05 16:56:35 UTC
I experience something related with the Logitech MOMO Racing wheel.
In addition, SDL_HapticOpenFromJoystick() fails with SDL_Error: "Haptic error Setting cooperative level to exclusive",
The device can be opened via SDL_HapticOpen(), but then I see the CreateNewEffect error described here. I have tried with 2.0.0, 2.0.1, 2.0.2, 2.0.3, & tip. None work.
Comment 2 hemimg 2015-06-11 04:00:07 UTC
I downloaded the Motioninjoy driver for my Dual Shock 3 that allows it to operate in DirectInput mode with rumble support and I get the same error. So it doesn't seem to be specific to the Logitech.
Comment 3 Ryan C. Gordon 2015-06-16 05:03:27 UTC
Assigning Edgar's bugs to me.

--ryan.
Comment 4 Trent Gamblin 2017-06-03 20:49:02 UTC
Created attachment 2749 [details]
Fix
Comment 5 Trent Gamblin 2017-06-03 20:50:38 UTC
I've found this bug as well, the problem is the XInput haptics driver takes values maxing out at 64K while SDL maxes at 32K. There IS a very faint rumble but it's barely noticable. I attached a patch that fixes the problem. More info here: https://discourse.libsdl.org/t/patch-low-magnitudes-with-xinput-haptics/22551
Comment 6 Trent Gamblin 2017-06-20 20:15:39 UTC
Any chance you're going to apply this fix?
Comment 7 Ryan C. Gordon 2017-06-21 05:22:30 UTC
This patch is now https://hg.libsdl.org/SDL/rev/db5c09aa4fd4, thanks!

--ryan.