SDL_HINT_APP_NAME(3)
SDL_HINT_APP_NAME π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_HINT_APP_NAME β a variable that sets the application name. yes, literally just the name. iconic behaviour, honestly. π
β¨ NAME β¨
SDL_HINT_APP_NAME β a variable setting the application name. that's it, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_APP_NAME "SDL_APP_NAME"
copy that include, copy that define, and you're so set. π
π DESCRIPTION π
so here's the tea: this hint lets you specify the application name that gets sent to the OS whenever the OS needs it. and when does the OS need it, you ask? bestie, so many times. like:
- it'll often show up in volume control applets for audio streams (yes, that little thing that tells you which app is making noise π§)
- and in lists of applications that are inhibiting the screensaver (aka the "who's keeping my screen awake" hall of fame π΄)
so you should use a string that actually describes your program. the manpage's own example is:
"My Game 2: The Revenge"
which is honestly a masterpiece of a name, no notes. π
heads up: this will override SDL_PROP_APP_METADATA_NAME_STRING if the application set it. so if you set both, this hint is the main character and the property is just... there. π
also, lowkey important: this hint should be set before SDL is initialized. before. not after. before. β°
π AVAILABILITY π
this hint has been available since SDL 3.2.0. so if you're on anything older, sorry bestie, no app name for you. π
π«Ά that's a wrap π«Ά
go forth and name your app something cute (or something menacing, "My Game 2: The Revenge" style, we don't judge π). this page came to you from the Simple Directmedia Layer girlies, SDL 3.4.18 edition β documented, dated, and delivered with love. mwah. πβ¨
π¦ 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