SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_MAIN_USE_CALLBACKS

Inform SDL to use the main callbacks instead of main.

Header File

Defined in <SDL3/SDL_main.h>

Syntax

#define SDL_MAIN_USE_CALLBACKS 1

Remarks

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, (or docs/README-main-functions.md in the source tree) for a more detailed explanation.

Version

This macro is used by the headers since SDL 3.0.0.

See Also


CategoryAPI, CategoryAPIMacro, CategoryMain


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.