SDL_main_func(3type)
β¨ NAME β¨
SDL_main_func β bestie, it's literally just the prototype for your app's main() function π
So like, this is the SDL3 DATATYPES section of the manual, and we're about to get into the whole vibe of how SDL wants you to declare your main character entry point. No cap. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_main.h>
typedef int (SDLCALL *SDL_main_func)(int argc, char *argv[]);
That's the whole thing. She's a function pointer typedef and she ate. π
π¦ FUNCTION PARAMETERS π¦
argcβ theargcof an ANSI-C style main function, fr fr. Same energy as always.argvβ theargvof an ANSI-C style main function. Also exactly what you think it is, no surprises here bestie π
π RETURN VALUE π
Returns an ANSI-C main return code. So like β generally 0 means the program finished successfully, and small non-zero values are considered errors. That's the whole rule, periodt. β
π AVAILABILITY π
This datatype has been available since SDL 3.2.0. So if you're on anything older, sorry bestie, she's not there yet π
And that's a wrap on the SDL_main_func(3type) page, brought to you by the fine folks at Simple Directmedia Layer, running the SDL 3.4.18 era π if you needed this page again later, it lives in section 3type β iykyk π«Άβ¨
π¦ 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