--- a/src/haptic/SDL_haptic.c Mon Jun 30 17:28:34 2008 +0000
+++ b/src/haptic/SDL_haptic.c Mon Jun 30 21:38:29 2008 +0000
@@ -273,6 +273,13 @@
if (!ValidHaptic(&haptic)) {
return -1;
}
+
+ /* Run the effect */
+ if (SDL_SYS_HapticRunEffect(haptic,&haptic->effects[effect]) < 0) {
+ return -1;
+ }
+
+ return 0;
}
/*
@@ -284,6 +291,13 @@
if (!ValidHaptic(&haptic)) {
return;
}
+
+ /* Not allocated */
+ if (haptic->effects[effect].hweffect == NULL) {
+ return;
+ }
+
+ SDL_SYS_HapticDestroyEffect(haptic, &haptic->effects[effect]);
}