main: Indented SDL_main headers for readability, removed SDL2 compat macros.
Specifically, SDL_WinRTRunApp, SDL_UIKitRunApp, and SDL_GDKRunApp macros were removed, as likely unnecessary to SDL3 users. A note was added to the migration doc about how to roll replacements. These are not going into SDL_oldnames.h. Fixes #8245.
This commit is contained in:
@@ -861,7 +861,15 @@ SDL3 doesn't have a static libSDLmain to link against anymore.
|
||||
Instead SDL_main.h is now a header-only library **and not included by SDL.h anymore**.
|
||||
|
||||
Using it is really simple: Just `#include <SDL3/SDL_main.h>` in the source file with your standard
|
||||
`int main(int argc, char* argv[])` function.
|
||||
`int main(int argc, char* argv[])` function. See docs/README-main-functions.md for details.
|
||||
|
||||
Several platform-specific entry point functions have been removed as unnecessary. If for some reason you explicitly need them, here are easy replacements:
|
||||
|
||||
```c
|
||||
#define SDL_WinRTRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
|
||||
#define SDL_UIKitRunApp(ARGC, ARGV, MAIN_FUNC) SDL_RunApp(ARGC, ARGV, MAIN_FUNC, NULL)
|
||||
#define SDL_GDKRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
|
||||
```
|
||||
|
||||
## SDL_metal.h
|
||||
|
||||
|
||||
Reference in New Issue
Block a user