SDL_OpenHaptic - Open a haptic device for use.
Contents
Availability
This function is available since SDL 3.2.0.
Description
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_SetHapticGain() and SDL_SetHapticAutocenter().
Function Parameters
instance_id
the haptic device instance ID.
Name
SDL_OpenHaptic - Open a haptic device for use.
Return Value
Returns the device identifier or NULL on failure; call SDL_GetError() for more information.
See Also
SDL_CloseHaptic(3), SDL_GetHaptics(3), SDL_OpenHapticFromJoystick(3), SDL_OpenHapticFromMouse(3), SDL_SetHapticAutocenter(3), SDL_SetHapticGain(3) Simple Directmedia Layer SDL 3.2.20 SDL_OpenHaptic(3)
Synopsis
#include<SDL3/SDL_haptic.h>SDL_Haptic*SDL_OpenHaptic(SDL_HapticIDinstance_id);
