src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2495 66c02abeef0e
parent 2491 10bc7aaf5114
child 2497 0893fbf73b3d
equal deleted inserted replaced
2494:a72a5f62d6b7 2495:66c02abeef0e
   436 
   436 
   437    SDL_SYS_HapticDestroyEffect(haptic, &haptic->effects[effect]);
   437    SDL_SYS_HapticDestroyEffect(haptic, &haptic->effects[effect]);
   438 }
   438 }
   439 
   439 
   440 /*
   440 /*
       
   441  * Gets the status of a haptic effect.
       
   442  */
       
   443 int
       
   444 SDL_HapticGetEffectStatus(SDL_Haptic *haptic, int effect)
       
   445 {
       
   446    if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) {
       
   447       return -1;
       
   448    }
       
   449 
       
   450    if ((haptic->supported & SDL_HAPTIC_STATUS) == 0) {
       
   451       SDL_SetError("Haptic device does not support status queries.");
       
   452       return -1;
       
   453    }
       
   454 
       
   455    return SDL_SYS_HapticGetEffectStatus(haptic, &haptic->effects[effect]);
       
   456 }
       
   457 
       
   458 /*
   441  * Sets the global gain of the device.
   459  * Sets the global gain of the device.
   442  */
   460  */
   443 int
   461 int
   444 SDL_HapticSetGain(SDL_Haptic * haptic, int gain )
   462 SDL_HapticSetGain(SDL_Haptic * haptic, int gain )
   445 {
   463 {