| SDL_RunApp(3) | SDL3 FUNCTIONS | SDL_RunApp(3) |
SDL_RunApp - Initializes and launches an SDL application, by doing platform-specific initialization before calling your mainFunction and cleanups after it returns, if that is needed for a specific platform, otherwise it just calls mainFunction.
Defined in SDL3/SDL_main.h
#include "SDL3/SDL.h"
int SDL_RunApp(int argc, char *argv[], SDL_main_func mainFunction, void *reserved);
You can use this if you want to use your own main() implementation
without using SDL_main
(like when using
SDL_MAIN_HANDLED ). When using this, you do not need
SDL_SetMainReady ().
Returns the return value from mainFunction: 0 on success, otherwise failure; SDL_GetError () might have more information on the failure.
Generally this is called once, near startup, from the process's initial thread.
This function is available since SDL 3.2.0.
| SDL 3.2.10 | Simple Directmedia Layer |