comparison 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
comparison
equal deleted inserted replaced
2487:4c8e25ef2d97 2488:8e2bdbccf7ff
290 } 290 }
291 return 1; 291 return 1;
292 } 292 }
293 293
294 /* 294 /*
295 * Updates an effect.
296 */
297 int
298 SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data)
299 {
300 if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) {
301 return -1;
302 }
303
304 /* Updates the effect */
305 if (SDL_SYS_HapticUpdateEffect(haptic,&haptic->effects[effect],data) < 0) {
306 return -1;
307 }
308
309 return 0;
310 }
311
312
313 /*
295 * Runs the haptic effect on the device. 314 * Runs the haptic effect on the device.
296 */ 315 */
297 int 316 int
298 SDL_HapticRunEffect(SDL_Haptic * haptic, int effect) 317 SDL_HapticRunEffect(SDL_Haptic * haptic, int effect)
299 { 318 {