diff options
author | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-31 18:38:35 +0800 |
commit | 2ec55fd974a63b705a4777c256d2222c874fa043 (patch) | |
tree | 48f1fea59ee9fc713a28a9aac3f05b98dc5ae66f /Source/3rdParty/SDL2/src/SDL_assert.c | |
parent | c581dfbf1e849f393861d15e82aa6446c0c1c310 (diff) |
*SDL project
Diffstat (limited to 'Source/3rdParty/SDL2/src/SDL_assert.c')
-rw-r--r-- | Source/3rdParty/SDL2/src/SDL_assert.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/3rdParty/SDL2/src/SDL_assert.c b/Source/3rdParty/SDL2/src/SDL_assert.c index 76f5d60..1ca083a 100644 --- a/Source/3rdParty/SDL2/src/SDL_assert.c +++ b/Source/3rdParty/SDL2/src/SDL_assert.c @@ -120,10 +120,17 @@ static void SDL_GenerateAssertionReport(void) } -static SDL_NORETURN void SDL_ExitProcess(int exitcode) +#if defined(__WATCOMC__) +#pragma aux SDL_ExitProcess aborts; +#endif +static void SDL_ExitProcess(int exitcode) { #ifdef __WIN32__ - ExitProcess(exitcode); + /* "if you do not know the state of all threads in your process, it is + better to call TerminateProcess than ExitProcess" + https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */ + TerminateProcess(GetCurrentProcess(), exitcode); + #elif defined(__EMSCRIPTEN__) emscripten_cancel_main_loop(); /* this should "kill" the app. */ emscripten_force_exit(exitcode); /* this should "kill" the app. */ @@ -134,7 +141,10 @@ static SDL_NORETURN void SDL_ExitProcess(int exitcode) } -static SDL_NORETURN void SDL_AbortAssertion(void) +#if defined(__WATCOMC__) +#pragma aux SDL_AbortAssertion aborts; +#endif +static void SDL_AbortAssertion(void) { SDL_Quit(); SDL_ExitProcess(42); |