comparison src/haptic/linux/SDL_syshaptic.c @ 2646:9408be170bff gsoc2008_force_feedback

Added SDL_HapticStopAll. Cleaned up the dummy haptic driver a bit.
author Edgar Simo <bobbens@gmail.com>
date Sun, 24 Aug 2008 17:32:50 +0000
parents 269ba4f28d0e
children e871cff1e3d2
comparison
equal deleted inserted replaced
2645:269ba4f28d0e 2646:9408be170bff
908 { 908 {
909 return -1; 909 return -1;
910 } 910 }
911 911
912 912
913 /*
914 * Stops all the currently playing effects.
915 */
916 int
917 SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
918 {
919 int i, ret;;
920
921 for (i=0; i<haptic->neffects; i++) {
922 ret = SDL_SYS_HapticStopEffect(haptic, &haptic->effects[i]);
923 if (ret < 0) {
924 SDL_SetError("Haptic: Error while trying to stop all playing effects.");
925 return -1;
926 }
927 }
928
929 return 0;
930 }
931
932
913 #endif /* SDL_HAPTIC_LINUX */ 933 #endif /* SDL_HAPTIC_LINUX */