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 1135

Summary: Simple rumble API for haptic
Product: SDL Reporter: Edgar Simo <bobbens>
Component: mainAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: All   
Attachments: Patch that adds simple rumble API to SDL.

Description Edgar Simo 2011-02-20 10:27:52 UTC
Created attachment 582 [details]
Patch that adds simple rumble API to SDL.

Adding patch that adds a simplified API for the haptic subsystem built ontop of the "real one" for those who want simple rumble without jumping through hoops.

Adds 4 functions:

- extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
- extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);

Also provided is test/testrumble.c which does test this.

This has all been tested on linux and has worked, but due to being built ontop of the other haptic API it should work on all OS the same.

On a side note there is no "haptic" component in the bug tracker.
Comment 1 Sam Lantinga 2011-02-20 10:55:40 UTC
Added, thanks! :)
http://hg.libsdl.org/SDL/rev/220d3af9121f