SDL_SetHint(3)
π SDL_SetHint(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_SetHint β she sets a hint with normal priority and she does it fabulously. no cap.
β¨ NAME β¨
SDL_SetHint β set a hint with normal priority. that's it, that's the whole job description. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
bool SDL_SetHint(const char *name, const char *value);
look at her. two lil const char * besties and a bool return. iconic.
π¦ DESCRIPTION π¦
so here's the tea, and it's important tea: hints will not be set if there's already an existing override hint or an environment variable that takes precedence over yours. like, sorry babe, someone more important already claimed that seat. π
if you really need to force your hint through, you can use SDL_SetHintWithPriority() to set the hint with override priority instead. that's the "i'm the main character now" option. periodt.
π FUNCTION PARAMETERS π
nameβ the hint to set. literally just the name of the hint you're trying to set, bestie. πvalueβ the value of the hint variable. this is the actual juice you're putting in the hint. β¨
β RETURN VALUE β
returns true on success, or false on failure. π and if it fails, 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. go wild. no vibes will be harmed. π
π AVAILABILITY π
this function has been available since SDL 3.2.0. she's been around a minute. π
π₯ SEE ALSO π₯
the whole hint squad, iykyk. π«Ά
lowkey a warning but also just facts: if an override hint or an environment variable is already winning, your SDL_SetHint call is getting politely ignored. know the hierarchy, bestie. π
and that's the page!! brought to you by Simple Directmedia Layer, version SDL 3.4.18 β mwah, love you, go set some hints responsibly πΈπβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms