SDL_AppIterate_func(3type)
π NAME π
SDL_AppIterate_func β the function pointer typedef for SDL_AppIterate, bestie. It's giving "your whole game loop, but as a type" energy. β¨
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_init.h>
typedef SDL_AppResult (SDLCALL *SDL_AppIterate_func)(void *appstate);
π¦ DESCRIPTION π¦
Okay so listen. These lil function-pointer typedefs are the ones SDL_EnterAppMainCallbacks uses, fr fr. It's all happening behind the scenes for apps that opted into the optional main callbacks β like, the machinery is doing its thing backstage while you live your life. π
So if you're an app that wants in on this vibe? You don't touch the typedef at all. You just implement SDL_AppIterate directly. That's it, that's the whole move. π
π FUNCTION PARAMETERS π
appstateβ an optional pointer, and you provide it yourself inSDL_AppInit. It's your little suitcase of state that gets passed back to you. Optional, so no pressure, but also likeβ¦ go off. π§³β¨
π₯ RETURN VALUE π₯
This one returns an SDL_AppResult, and it's a whole vibe check with three outcomes:
SDL_APP_FAILUREβ terminate, but with an error. It's giving π.SDL_APP_SUCCESSβ terminate, and you ate. Successful exit, slay. πSDL_APP_CONTINUEβ keep going, we're not done here. The main character energy continues. π
β AVAILABILITY β
This datatype has been available since SDL 3.2.0. So if you're on anything older, no cap, you're not getting it. π«Ά
And that's the page, bestie!! This one came to you from Simple Directmedia Layer, version SDL 3.4.18 β mwah, iconic, obsessed, periodt. ππβ¨
π¦ 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