SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY(3)

πŸ’– SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY(3) πŸ’–

okay bestie, gather round, because today we're talking about a little hint called SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY(3) β€” she's from the SDL3 functions manual and she's lowkey iconic πŸŽ€


✨ NAME ✨

SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY β€” a variable that controls whether the SDL activity is allowed to be re-created. that's it, that's the whole vibe πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"

like yes, it's a #define, she's a string, she's a hint, she's everything πŸ’…


✨ DESCRIPTION ✨

okay so here's the tea β˜• β€” if this hint is true, the activity can be recreated on demand by the OS, and the Java static data AND the C++ static data stay right where they are with their current values. they do not reset. they are thriving. ✨

but if this hint is false, then SDL will call exit() when you return from your main function, and the application gets terminated and then started fresh each and every time. no memories, no static data, just a whole new girlboss era every launch 😭

the variable can be set to the following values:

  • "0" β€” the application starts fresh at each launch. (default) 🫢
  • "1" β€” the application activity can be recreated by the OS. πŸ”₯

and the best part? this hint can be set anytime. no timing drama, no restrictions, she's flexible. periodt πŸ’…


✨ AVAILABILITY ✨

this hint is available since SDL 3.2.0. if you're on anything older, bestie, i'm so sorry, she's not there yet πŸ™ˆ


mwah πŸ’– that's the whole page. go forth and let your activity be recreated (or don't, your call, she's a hint for a reason).

this lil love letter to SDL came from the Simple Directmedia Layer crew, version SDL 3.4.18, and that's the SDL_HINT_ANDR...EATE_ACTIVITY(3) manual page β€” short name, long title, all the feels. bye bestie, see you in the next manpage πŸŒΈπŸ¦‹πŸ’œ

πŸ“¦ where this page comes from