sdlGetHapticFromId function
Get the SDL_Haptic associated with an instance ID, if it has been opened.
\param instance_id the instance ID to get the SDL_Haptic for. \returns an SDL_Haptic on success or NULL on failure or if it hasn't been opened yet; call SDL_GetError() for more information.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_GetHapticFromID(SDL_HapticID instance_id)
Implementation
Pointer<SdlHaptic> sdlGetHapticFromId(int instanceId) {
final sdlGetHapticFromIdLookupFunction = libSdl3.lookupFunction<
Pointer<SdlHaptic> Function(Uint32 instanceId),
Pointer<SdlHaptic> Function(int instanceId)>('SDL_GetHapticFromID');
return sdlGetHapticFromIdLookupFunction(instanceId);
}