SDL_ONAPPLICATIONWILLTERMINATE(3)

πŸ¦‹ SDL_OnApplicationWillTerminate πŸ¦‹

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_OnApplicationWillTerminate πŸ’–


✨ NAME ✨

SDL_OnApplicationWillTerminate β€” the lil hook that lets iOS apps with their own external event handling report onApplicationWillTerminate 🫢


🌈 SYNOPSIS 🌈

#include <SDL3/SDL_system.h>

void SDL_OnApplicationWillTerminate(void);

πŸ’… DESCRIPTION πŸ’…

so here's the vibe: this function lets iOS apps that handle their own events hook into SDL so they can generate SDL events. it maps directly to an iOS-specific event, but β€” and this is the iconic part β€” since it doesn't do anything iOS-specific internally, it's available on all platforms, just in case it might be useful for some specific paradigm πŸ‘‘

most apps do not need to use this directly, fr fr. SDL's internal event code will handle all of this for windows created by SDL_CreateWindow ✨ like, it's already doing it for you, no cap.


🧚 THREAD SAFETY 🧚

it is safe to call this function from any thread. yes bestie, ANY. go off πŸ’…


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0 πŸŽ€


and that's the whole thing! no extra lore, no hidden flags, it's giving "short and sweet" πŸ“

Simple Directmedia Layer Β· SDL 3.4.18 β€” mwah, ty for reading, ily, now go close your app gracefully πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from