SDL_HAPTIC_GAIN(3)

πŸ’– SDL_HAPTIC_GAIN πŸ’–

ok bestie, quick lil page from the SDL3 FUNCTIONS section of the manual, and it's short but it's mighty. let's go 🫢


✨ NAME ✨

SDL_HAPTIC_GAIN β€” device can set global gain. that's the whole vibe. the device can do the gain thing. slay.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_haptic.h>

#define SDL_HAPTIC_GAIN       (1u<<16)

like, that's it. that's the whole thing. one include, one macro, no cap. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: the device supports setting the global gain. that's the flex. if you see this flag, your haptic device can do the global gain situation. it's giving capability. it's giving yes-i-can. πŸ”₯


πŸŽ€ AVAILABILITY πŸŽ€

this macro has been here since SDL 3.2.0. not new new, but not ancient either. she's been around, she's established, she's iconic. πŸ‘‘


🌈 SEE ALSO 🌈

  • SDL_SetHapticGain(3) β€” the actual function that does the setting. this macro is like the "yes you may" and that function is the "okay bet, doing it". they're a duo, fr fr. ✨

🫢 tiny reminder bestie: this macro is just a capability flag. it tells you the device can set global gain β€” it doesn't set anything itself. go read SDL_SetHapticGain(3) for the actual doing. iykyk πŸ’œ

and that's the whole page!! brought to you by Simple Directmedia Layer, version SDL 3.4.18 β€” mwah, kisses, stan SDL, bye bestie πŸ˜­πŸ’–πŸ§š

πŸ“¦ where this page comes from