Function SDL_CreateHapticEffect

pub unsafe extern "C" fn SDL_CreateHapticEffect(
    haptic: *mut SDL_Haptic,
    effect: *const SDL_HapticEffect,
) -> i32
Available on crate feature dep_sdl3 only.
Expand description

Create a new haptic effect on a specified device.

§Parameters

  • haptic: an SDL_Haptic device to create the effect on.
  • effect: an SDL_HapticEffect structure containing the properties of the effect to create.

§Return value

Returns the ID of the effect on success or -1 on failure; call SDL_GetError() for more information.

§Availability

This function is available since SDL 3.2.0.

§See also