SDL_DestroyHapticEffect(3)

πŸ’– SDL_DestroyHapticEffect πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we are today learning how to yeet a haptic effect into the void 🫢


✨ NAME ✨

SDL_DestroyHapticEffect β€” destroy a haptic effect on the device, no cap πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_haptic.h>

void SDL_DestroyHapticEffect(SDL_Haptic *haptic, SDL_HapticEffectID effect);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. this one is the cleanup queen πŸ‘‘ it will stop the effect if it's running β€” like, mid-vibration, gone, bye β€” and then it destroys it.

and here's the lowkey best part: effects are automatically destroyed when the device is closed, so if you forget, the universe forgives you. fr fr. still, being tidy is main character energy ✨


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • haptic β€” the SDL_Haptic device to destroy the effect on. the vibe holder, the hardware homegirl 🫢
  • effect β€” the ID of the haptic effect to destroy. the little number that says which one gets the axe πŸ”₯

⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0 πŸ’œ


🌈 SEE ALSO 🌈


and that's the whole page, bestie, you ate πŸ’… this was SDL_DestroyHapticEffect(3) from the SDL3 FUNCTIONS crew, brought to you by Simple Directmedia Layer, version SDL 3.4.18 πŸŽ€ bye bye, go destroy responsibly πŸ“

πŸ“¦ where this page comes from