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 3020

Summary: SDL_HapticRumbleInit() FAILS
Product: SDL Reporter: Joe Thompson <mini_joe>
Component: hapticAssignee: Ryan C. Gordon <icculus>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 2.1   
Hardware: x86_64   
OS: Windows 7   

Description Joe Thompson 2015-06-16 03:57:11 UTC
With Direct Input device (MOMO Steering Wheel w/FF)
SDL_HapticRumbleInit() FAILS with error:
Haptic error Unable to create effect
Comment 1 Joe Thompson 2015-06-16 03:58:48 UTC
This effects 2.0.4 rc1
Comment 2 Ryan C. Gordon 2015-06-16 05:03:51 UTC
Assigning Edgar's bugs to me.

--ryan.
Comment 3 Joe Thompson 2016-05-28 15:41:54 UTC
The MOMO Steering wheel only seems to support SDL_HAPTIC_CARTESIAN coordinates for downloaded effects. The SDL built-in Rumble effect does not set the efx->periodic.direction.type. So SDL_HAPTIC_POLAR is used.

In SDL_haptic.c (at line 767) adding 

efx->periodic.direction.type = SDL_HAPTIC_CARTESIAN;
efx->periodic.direction.dir[0] = 0;

allows SDL_HapticRumbleInit() to succeed. 

I have no other dinput devices, so I do not know if this would break existing Rumble devices.

Joe