Simple rumble API for haptic
Edgar Simo 2011-02-20 10:27:52 PST 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.
This commit is contained in:
parent
e7aaeec596
commit
f2209fb448
5 changed files with 326 additions and 3 deletions
|
@ -28,6 +28,7 @@ TARGETS = \
|
|||
testgl2$(EXE) \
|
||||
testgles$(EXE) \
|
||||
testhaptic$(EXE) \
|
||||
testrumble$(EXE) \
|
||||
testhread$(EXE) \
|
||||
testiconv$(EXE) \
|
||||
testime$(EXE) \
|
||||
|
@ -133,6 +134,9 @@ testgles$(EXE): $(srcdir)/testgles.c $(srcdir)/common.c
|
|||
testhaptic$(EXE): $(srcdir)/testhaptic.c
|
||||
$(CC) -o $@ $? $(CFLAGS) $(LIBS)
|
||||
|
||||
testrumble$(EXE): $(srcdir)/testrumble.c
|
||||
$(CC) -o $@ $? $(CFLAGS) $(LIBS)
|
||||
|
||||
testhread$(EXE): $(srcdir)/testhread.c
|
||||
$(CC) -o $@ $? $(CFLAGS) $(LIBS)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue