Better document that main functionality is in SDL_main.h

Fixes https://github.com/libsdl-org/SDL/issues/12159
This commit is contained in:
Sam Lantinga 2025-02-25 08:38:39 -08:00
parent bb8dcf08e7
commit ad840e8796
1 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,9 @@
* should look like this: * should look like this:
* *
* ```c * ```c
* #include <SDL3/SDL.h>
* #include <SDL3/SDL_main.h>
*
* int main(int argc, char *argv[]) * int main(int argc, char *argv[])
* { * {
* } * }
@ -38,7 +41,7 @@
* This is also where an app can be configured to use the main callbacks, via * This is also where an app can be configured to use the main callbacks, via
* the SDL_MAIN_USE_CALLBACKS macro. * the SDL_MAIN_USE_CALLBACKS macro.
* *
* This is a "single-header library," which is to say that including this * SDL_main.h is a "single-header library," which is to say that including this
* header inserts code into your program, and you should only include it once * header inserts code into your program, and you should only include it once
* in most cases. SDL.h does not include this header automatically. * in most cases. SDL.h does not include this header automatically.
* *