Mercurial > sdl-ios-xcode
diff src/haptic/SDL_haptic.c @ 2488:8e2bdbccf7ff gsoc2008_force_feedback
Added SDL_HapticUpdateEffect().
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Tue, 01 Jul 2008 18:35:05 +0000 |
parents | 24dd8b8669fa |
children | 96adc8025331 |
line wrap: on
line diff
--- a/src/haptic/SDL_haptic.c Tue Jul 01 16:42:12 2008 +0000 +++ b/src/haptic/SDL_haptic.c Tue Jul 01 18:35:05 2008 +0000 @@ -292,6 +292,25 @@ } /* + * Updates an effect. + */ +int +SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data) +{ + if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) { + return -1; + } + + /* Updates the effect */ + if (SDL_SYS_HapticUpdateEffect(haptic,&haptic->effects[effect],data) < 0) { + return -1; + } + + return 0; +} + + +/* * Runs the haptic effect on the device. */ int