Scroll to navigation

SDL_MAIN_USE_CALLBACKS(3) SDL3 FUNCTIONS SDL_MAIN_USE_CALLBACKS(3)

NAME

SDL_MAIN_USE_CALLBACKS - Inform SDL to use the main callbacks instead of main.

HEADER FILE

Defined in SDL3/SDL_main.h

SYNOPSIS

#include "SDL3/SDL.h"
#define SDL_MAIN_USE_CALLBACKS 1

DESCRIPTION

SDL does not define this macro, but will check if it is defined when including SDL_main.h . If defined, SDL will expect the app to provide several functions: SDL_AppInit ,

SDL_AppEvent , SDL_AppIterate , and

SDL_AppQuit . The app should not provide a main function in this case, and doing so will likely cause the build to fail.

Please see [README/main-functions](README/main-functions), (or docs/README-main-functions.md in the source tree) for a more detailed explanation.

AVAILABILITY

This macro is used by the headers since SDL 3.1.3.

SEE ALSO

(3), SDL_AppInit(3), (3), SDL_AppEvent(3), (3), SDL_AppIterate(3), (3), SDL_AppQuit(3)

SDL 3.1.6 Simple Directmedia Layer