SDL_SetHintWithPriority(3)

πŸ’– SDL_SetHintWithPriority πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual β€” this one's about setting a hint with a specific priority, and it's lowkey iconic once you get the vibe. ✨


🌸 NAME 🌸

SDL_SetHintWithPriority β€” set a hint with a specific priority. that's it, that's the whole job. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_hints.h>

bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority);

✨ DESCRIPTION ✨

so here's the tea, bestie: the priority is what controls the behavior when you're setting a hint that already has a value. πŸ«–

Hints will replace existing hints of their priority and lower. that's the rule, no cap.

And listen β€” environment variables are considered to have override priority. so like, if the env is talking, it's the main character and everything else is a supporting role. πŸ‘‘


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • name β€” the hint to set. which one are we messing with today, queen?
  • value β€” the value of the hint variable. the actual content, the moment, the vibe.
  • priority β€” the SDL_HintPriority level for the hint. how loud do you want this hint to be?

πŸ’œ RETURN VALUE πŸ’œ

Returns true on success or false on failure. if it flopped, call SDL_GetError() for more information β€” she will tell you exactly what went wrong, fr fr. 😭


πŸ”₯ THREAD SAFETY πŸ”₯

It is safe to call this function from any thread. yes, ANY thread. go off, multi-threaded legend. 🧚


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. vintage-ish but make it fresh. πŸ“


🌈 SEE ALSO 🌈


Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_SetHintWithPriority(3) β€” mwah, that's the whole page, tysm for reading, go set some hints and slay πŸ’–βœ¨πŸŽ€πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from