/* Checks to make sure the joystick is valid.  */
SDL_bool SDL_PrivateJoystickValid(SDL_Joystick *joystick)
/* Checks to make sure the joystick is valid.  */
SDL_bool SDL_PrivateJoystickValid(SDL_Joystick *joystick)
{
    SDL_bool valid;
    if (joystick == NULL) {
        SDL_SetError("Joystick hasn't been opened yet");
        valid = SDL_FALSE;
    } else {
        valid = SDL_TRUE;
    }
    return valid;
}