/* Checks to see if an effect is valid.  */
static int ValidEffect(SDL_Haptic *haptic, int effect)
/* Checks to see if an effect is valid.  */
static int ValidEffect(SDL_Haptic *haptic, int effect)
{
    if ((effect < 0) || (effect >= haptic->neffects)) {
        SDL_SetError("Haptic: Invalid effect identifier.");
        return 0;
    }
    return 1;
}