mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-17 11:55:33 +00:00
SDL_main.h: Document SDL_MAIN_USE_CALLBACKS.
This commit is contained in:
@@ -151,6 +151,31 @@
|
|||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||||
|
/**
|
||||||
|
* Inform SDL to use the main callbacks instead of main.
|
||||||
|
*
|
||||||
|
* SDL does not define this macro, but will check if it is defined to
|
||||||
|
* any value in 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.
|
||||||
|
*
|
||||||
|
* \since This macro is used by the headers since SDL 3.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AppInit
|
||||||
|
* \sa SDL_AppEvent
|
||||||
|
* \sa SDL_AppIterate
|
||||||
|
* \sa SDL_AppQuit
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_USE_CALLBACKS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) || defined(SDL_MAIN_USE_CALLBACKS)
|
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) || defined(SDL_MAIN_USE_CALLBACKS)
|
||||||
#define main SDL_main
|
#define main SDL_main
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user