SDL_GetHapticEffectStatus(3)

πŸ’– SDL_GetHapticEffectStatus(3) πŸ’–

okay so bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_GetHapticEffectStatus β€” the girl whose whole job is telling you if your haptic effect is currently doing the thing or not. ✨


🌸 NAME 🌸

SDL_GetHapticEffectStatus β€” get the status of the current effect on the specified haptic device. that's it, that's the vibe. πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3/SDL_haptic.h>

bool SDL_GetHapticEffectStatus(SDL_Haptic *haptic, SDL_HapticEffectID effect);

like, look at her. two little args, one little bool back. iconic. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so real talk: the device must support the SDL_HAPTIC_STATUS feature. no SDL_HAPTIC_STATUS, no status check, periodt. don't come crying to me when the haptic device said "not my era" πŸ’€


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • haptic β€” the SDL_Haptic device you want to query for the effect status on. your lil buzzing bestie 🫢
  • effect β€” the ID of the haptic effect whose status you're checking. iykyk which one you started πŸ‘‘

🌈 RETURN VALUE 🌈

returns true if it is playing, false if it isn't playing or if haptic status isn't supported at all. so like, false is giving "not playing OR not supported," lowkey a two-for-one situation, just so you're not out here confused 😭


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. so if you're on anything older, she's not there yet, no cap.


πŸ’œ SEE ALSO πŸ’œ

  • SDL_GetHapticFeatures(3) β€” go check her out, she's the one who tells you if SDL_HAPTIC_STATUS is even a thing on your device 🧚

not me ending this with the reminder that the feature check comes first, bestie. SDL_HAPTIC_STATUS or it's a no from the device πŸ™ˆ

Simple Directmedia Layer πŸ“ SDL 3.4.18 πŸ¦‹ β€” mwah, that's the source and version, love you, bye, go make something buzz πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from