comparison src/haptic/SDL_haptic.c @ 2517:37c13c12c878 gsoc2008_force_feedback

Broke API by introducing iterations to SDL_HapticRunEffects(). Fixed minor issues.
author Edgar Simo <bobbens@gmail.com>
date Thu, 10 Jul 2008 17:54:08 +0000
parents 030fc4375e63
children af9df9662807
comparison
equal deleted inserted replaced
2516:6da022b18314 2517:37c13c12c878
468 468
469 /* 469 /*
470 * Runs the haptic effect on the device. 470 * Runs the haptic effect on the device.
471 */ 471 */
472 int 472 int
473 SDL_HapticRunEffect(SDL_Haptic * haptic, int effect) 473 SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, int iterations)
474 { 474 {
475 if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) { 475 if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) {
476 return -1; 476 return -1;
477 } 477 }
478 478
479 /* Run the effect */ 479 /* Run the effect */
480 if (SDL_SYS_HapticRunEffect(haptic,&haptic->effects[effect]) < 0) { 480 if (SDL_SYS_HapticRunEffect(haptic,&haptic->effects[effect], iterations) < 0) {
481 return -1; 481 return -1;
482 } 482 }
483 483
484 return 0; 484 return 0;
485 } 485 }