sdlHapticOpen function
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
extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index)
Implementation
Pointer<SdlHaptic> sdlHapticOpen(int deviceIndex) {
final sdlHapticOpenLookupFunction = libSdl2.lookupFunction<
Pointer<SdlHaptic> Function(Int32 deviceIndex),
Pointer<SdlHaptic> Function(int deviceIndex)>('SDL_HapticOpen');
return sdlHapticOpenLookupFunction(deviceIndex);
}