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 1867

Summary: XInput Haptic cannot use SDL_HapticOpenFromJoystick
Product: SDL Reporter: Ethan Lee <flibitijibibo>
Component: hapticAssignee: Edgar Simo <bobbens>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2 CC: franzschrober
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   
Attachments: Small test case for this bug report.

Description Ethan Lee 2013-05-26 09:31:36 UTC
Created attachment 1150 [details]
Small test case for this bug report.

On Windows with XInput, SDL_HapticOpenFromJoystick does not work. This is presumably because of the way that XInput haptic devices are created.

Attached is a test case to demonstrate the bug, with a quick fix that can get around this bug... however, this is only needed on Windows, so it messes with portability a bit (it also may not line up with the controller indices, depending on what hardware is connected).
Comment 1 franzschrober 2013-06-26 17:33:13 UTC
See http://thread.gmane.org/gmane.comp.lib.sdl/60755/focus=60759 for a patch
Comment 2 Sam Lantinga 2013-06-29 18:06:59 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/8bdc5aac93d7