/// <summary> /// Creates a new instance of a haptic effect. /// </summary> /// <param name="effect">The effect.</param> /// <returns>The effect instance.</returns> public HapticEffectInstance NewEffect(HapticEffect effect) { var nativeEffect = effect.ToNative(); return(HapticEffectInstance.IndexToInstance(Pointer, Native.CheckError(Native.SDL_HapticNewEffect(Pointer, in nativeEffect)))); }
/// <summary> /// Determines whether the effect is supported. /// </summary> /// <param name="effect">The effect.</param> /// <returns>Whether the effect is supported.</returns> public bool EffectSupported(HapticEffect effect) { var nativeEffect = effect.ToNative(); return(Native.SDL_HapticEffectSupported(Pointer, in nativeEffect)); }
/// <summary> /// Updates the effect instance. /// </summary> /// <param name="effect">The effect to update to.</param> public void UpdateEffect(HapticEffect effect) { var nativeEffect = effect.ToNative(); _ = SdlSharp.Native.CheckError(SdlSharp.Native.SDL_HapticUpdateEffect(Native, Index, in nativeEffect)); }
/// <summary> /// Updates the effect instance. /// </summary> /// <param name="effect">The effect to update to.</param> public void UpdateEffect(HapticEffect effect) { var nativeEffect = effect.ToNative(); _ = Native.CheckError(Native.SDL_HapticUpdateEffect(Pointer, Index, in nativeEffect)); }
/// <summary> /// Creates a new instance of a haptic effect. /// </summary> /// <param name="effect">The effect.</param> /// <returns>The effect instance.</returns> public HapticEffectInstance NewEffect(HapticEffect effect) { var nativeEffect = effect.ToNative(); return(HapticEffectInstance.IndexToInstance(Native, SdlSharp.Native.CheckError(SdlSharp.Native.SDL_HapticNewEffect(Native, in nativeEffect)))); }
/// <summary> /// Determines whether the effect is supported. /// </summary> /// <param name="effect">The effect.</param> /// <returns>Whether the effect is supported.</returns> public bool EffectSupported(HapticEffect effect) { var nativeEffect = effect.ToNative(); return(SdlSharp.Native.SDL_HapticEffectSupported(Native, in nativeEffect)); }