src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2645 269ba4f28d0e
parent 2561 3696b9ce8a37
child 2646 9408be170bff
equal deleted inserted replaced
2644:ef0ba67154c1 2645:269ba4f28d0e
   636    }
   636    }
   637 
   637 
   638    return 0;
   638    return 0;
   639 }
   639 }
   640 
   640 
   641 
   641 /*
       
   642  * Pauses the haptic device.
       
   643  */
       
   644 int
       
   645 SDL_HapticPause(SDL_Haptic * haptic)
       
   646 {
       
   647    if (!ValidHaptic(haptic)) {
       
   648       return -1;
       
   649    }
       
   650 
       
   651    if ((haptic->supported & SDL_HAPTIC_PAUSE) == 0) {
       
   652       SDL_SetError("Haptic: Device does not support setting pausing.");
       
   653       return -1;
       
   654    }
       
   655 
       
   656    return SDL_SYS_HapticPause(haptic);
       
   657 }
       
   658 
       
   659 /*
       
   660  * Unpauses the haptic device.
       
   661  */
       
   662 int
       
   663 SDL_HapticUnpause(SDL_Haptic * haptic)
       
   664 {
       
   665    if (!ValidHaptic(haptic)) {
       
   666       return -1;
       
   667    }
       
   668 
       
   669    if ((haptic->supported & SDL_HAPTIC_PAUSE) == 0) {
       
   670       return 0; /* Not going to be paused, so we pretend it's unpaused. */
       
   671    }
       
   672 
       
   673    return SDL_SYS_HapticUnpause(haptic);
       
   674 }
       
   675