Make GDK's SDL_main header-only

This commit is contained in:
Daniel Gibson 2022-12-11 04:45:38 +01:00 committed by Sam Lantinga
parent 2d0eaea1cc
commit 28ecbbf0b5
5 changed files with 29 additions and 35 deletions

View file

@ -54,9 +54,10 @@
#elif defined(__GDK__)
/* On GDK, SDL provides a main function that initializes the game runtime.
Please note that #include'ing SDL_main.h is not enough to get a main()
function working. You must either link against SDL3_main or, if not possible,
call the SDL_GDKRunApp function from your entry point.
If you prefer to write your own WinMain-function instead of having SDL
provide one that calls your main() function,
#define SDL_MAIN_HANDLED before #include'ing SDL_main.h
and call the SDL_GDKRunApp function from your entry point.
*/
#define SDL_MAIN_NEEDED