Is calling SDL_Init
and other initialization functions before SDL_EnterAppMainCallbacks
guaranteed to be safe? This means that SDL_AppInit
would be dummy.
The SDL code seems to be fine with that. I also tested it on Debian and it works just fine. But it’s not explicitly stated in the documentation.
I’m writing my own simplified XNA style framework, the heavy work is done by SDL3. However I would like to use the main callbacks to support web exports without asyncify and also do a game initialization using top-level statements. I found that it’s not easy to deal with the callbacks in a different language than C, doing the setup first with dummy SDL_AppInit
simplifies the whole approach for me (I can clarify even further).
If it’s guaranteed, I would update the docs.