comparison src/haptic/SDL_haptic.c @ 2485:67978eea6d10 gsoc2008_force_feedback

Added SDL_HapticStopEffect().
author Edgar Simo <bobbens@gmail.com>
date Tue, 01 Jul 2008 14:31:04 +0000
parents 666472fd4cb0
children 24dd8b8669fa
comparison
equal deleted inserted replaced
2484:666472fd4cb0 2485:67978eea6d10
305 305
306 return 0; 306 return 0;
307 } 307 }
308 308
309 /* 309 /*
310 * Stops the haptic effect on the device.
311 */
312 int
313 SDL_HapticStopEffect(SDL_Haptic * haptic, int effect)
314 {
315 if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) {
316 return -1;
317 }
318
319 /* Stop the effect */
320 if (SDL_SYS_HapticStopEffect(haptic,&haptic->effects[effect]) < 0) {
321 return -1;
322 }
323
324 return 0;
325 }
326
327 /*
310 * Gets rid of a haptic effect. 328 * Gets rid of a haptic effect.
311 */ 329 */
312 void 330 void
313 SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect) 331 SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect)
314 { 332 {