SDL_UnregisterApp(3)
π SDL_UnregisterApp π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, page SDL_UnregisterApp(3) β she's niche, she's win32-coded, and she's here to clean up after her sister. let's get into it π
β¨ NAME β¨
SDL_UnregisterApp β deregister the win32 window class from an SDL_RegisterApp call. it's the un-registration. the goodbye. the "we don't do that here anymore" π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_main.h>
void SDL_UnregisterApp(void);
that's it. no args, no return value, no drama. she takes nothing and gives nothing back, which honestly? iconic π
π DESCRIPTION π
so like, you know how SDL_RegisterApp does a thing? yeah. this undoes that thing. that's the whole vibe. it's the "undo" button for the effects of SDL_RegisterApp π«Ά
but listen. most applications do not need to call this directly, and honestly they should not. lowkey stay out of it. SDL handles this itself β it calls this function for you when it's deinitializing the video subsystem. so unless you're doing something extremely specific, hands off, bestie π
now, is it safe to call more than once? yes ma'am β¨ it is safe to call this multiple times β as long as every single call is eventually paired with a prior call to SDL_RegisterApp. it's giving "every goodbye needs a hello first." no unpaired calls, no chaos π
and here's the actual mechanic, pay attention: the window class will only be deregistered when the registration counter in SDL_RegisterApp decrements to zero through calls to this function. so she's counting down. one call, one decrement. zero means done. not before. periodt π
π₯ THREAD SAFETY π₯
this function is not thread safe. do not. do not do the multithread thing with her. she is one lane only π«π§΅
β AVAILABILITY β
this function has been available since SDL 3.2.0 β so if you're on anything older, she simply does not exist for you, sorry babe π
and that's the whole page, no cap. this was brought to you by the lovely humans at Simple Directmedia Layer, running SDL 3.4.18 β mwah, thanks for reading, go pair your calls, and stay deregistered πππ¦
π¦ 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