Function sdl2_sys::SDL_HapticOpen

source ·
pub unsafe extern "C" fn SDL_HapticOpen(
    device_index: c_int
) -> *mut SDL_Haptic
Expand description

Open a haptic device for use.

The index passed as an argument refers to the N’th haptic device on this system.

When opening a haptic device, its gain will be set to maximum and autocenter will be disabled. To modify these values use SDL_HapticSetGain() and SDL_HapticSetAutocenter().

\param device_index index of the device to open \returns the device identifier or NULL on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_HapticClose \sa SDL_HapticIndex \sa SDL_HapticOpenFromJoystick \sa SDL_HapticOpenFromMouse \sa SDL_HapticPause \sa SDL_HapticSetAutocenter \sa SDL_HapticSetGain \sa SDL_HapticStopAll