SDL_MAIN_USE_CALLBACKS(3)

SDL_MAIN_USE_CALLBACKS3

Inform sdl to use the main callbacks instead of main.

Usage

#include "SDL3/SDL.h"

#define SDL_MAIN_USE_CALLBACKS 1

Header file

Defined in SDL3/SDL_main.h

Overview

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.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.