mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-26 12:59:18 +01:00
assert: mark SDL_ExitProcess as SDL_NORETURN again.
Put in a hack to (hopefully) make MingW happy. Fixes Bugzilla #4100.
This commit is contained in:
parent
04b50f6c6b
commit
f5a347853d
@ -123,14 +123,16 @@ static void SDL_GenerateAssertionReport(void)
|
|||||||
#if defined(__WATCOMC__)
|
#if defined(__WATCOMC__)
|
||||||
#pragma aux SDL_ExitProcess aborts;
|
#pragma aux SDL_ExitProcess aborts;
|
||||||
#endif
|
#endif
|
||||||
static void SDL_ExitProcess(int exitcode)
|
static SDL_NORETURN void SDL_ExitProcess(int exitcode)
|
||||||
{
|
{
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
/* "if you do not know the state of all threads in your process, it is
|
/* "if you do not know the state of all threads in your process, it is
|
||||||
better to call TerminateProcess than ExitProcess"
|
better to call TerminateProcess than ExitProcess"
|
||||||
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */
|
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */
|
||||||
TerminateProcess(GetCurrentProcess(), exitcode);
|
TerminateProcess(GetCurrentProcess(), exitcode);
|
||||||
|
/* MingW doesn't have TerminateProcess marked as noreturn, so add an
|
||||||
|
ExitProcess here that will never be reached but make MingW happy. */
|
||||||
|
ExitProcess(exitcode);
|
||||||
#elif defined(__EMSCRIPTEN__)
|
#elif defined(__EMSCRIPTEN__)
|
||||||
emscripten_cancel_main_loop(); /* this should "kill" the app. */
|
emscripten_cancel_main_loop(); /* this should "kill" the app. */
|
||||||
emscripten_force_exit(exitcode); /* this should "kill" the app. */
|
emscripten_force_exit(exitcode); /* this should "kill" the app. */
|
||||||
|
Loading…
Reference in New Issue
Block a user