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 - SDL_HapticRumbleInit() FAILS
Summary: SDL_HapticRumbleInit() FAILS
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: haptic (show other bugs)
Version: HG 2.1
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 03:57 UTC by Joe Thompson
Modified: 2016-10-08 00:54 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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