/* Returns the haptic device if mouse is haptic or NULL elsewise.  */
SDL_Haptic* SDL_HapticOpenFromMouse(void)
/* Returns the haptic device if mouse is haptic or NULL elsewise.  */
SDL_Haptic* SDL_HapticOpenFromMouse(void)
{
    int device_index;
    device_index = SDL_SYS_HapticMouse();
    if (device_index < 0) {
        SDL_SetError("Haptic: Mouse isn't a haptic device.");
        return NULL;
    }
    return SDL_HapticOpen(device_index);
}