[][src]Function sdl2_sys::SDL_HapticOpen

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

\brief Opens 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. \return Device identifier or NULL on error.

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