SDL_GetMaxHapticEffects(3)

πŸ’– SDL_GetMaxHapticEffects πŸ’–

okay bestie, welcome to the SDL_GetMaxHapticEffects(3) page, straight out of the SDL3 FUNCTIONS shelf πŸŽ€ this one lives in the manual, and it's literally about how many haptic effects your lil rumbly device can hold in its brain at once. slay.


✨ NAME ✨

SDL_GetMaxHapticEffects β€” get the number of effects a haptic device can store. no cap, that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_haptic.h>

int SDL_GetMaxHapticEffects(SDL_Haptic *haptic);

look at her. one include, one function call, zero drama πŸ¦‹


πŸ’« DESCRIPTION πŸ’«

so here's the tea: on some platforms this isn't fully supported, and therefore it's an approximation. like, it's giving "best guess" energy, not "certified truth" energy 😭

⚠️ Always check to see if your created effect was actually created and do not rely solely on SDL_GetMaxHapticEffects(). ⚠️

fr fr, do not just trust the number and vibe off into the sunset. verify your effect actually exists. that's the move πŸ‘‘


🫢 FUNCTION PARAMETERS 🫢

  • haptic β€” the SDL_Haptic device to query. that's the one you're asking "how many effects can u hold bestie" πŸ’œ

πŸ”₯ RETURN VALUE πŸ”₯

Returns the number of effects the haptic device can store, or a negative error code on failure 😭 and if it fails? call SDL_GetError() for more information, she'll tell you what went wrong πŸ“


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. iconic behavior honestly πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, iykyk 🌈


okay that's the whole page bestie!! this was brought to you by Simple Directmedia Layer, version SDL 3.4.18 β€” mwah, love u, go make something rumble πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from