From 9cd2e9ec8fc0127393dfce9c0359d500c8c238be Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 09 Apr 2019 02:22:50 +0000
Subject: [PATCH] updae source to 2.0.9 source

---
 source/src/SDL_assert.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/source/src/SDL_assert.c b/source/src/SDL_assert.c
index 76f5d60..1ca083a 100644
--- a/source/src/SDL_assert.c
+++ b/source/src/SDL_assert.c
@@ -120,10 +120,17 @@
 }
 
 
-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_AbortAssertion(void)
+#if defined(__WATCOMC__)
+#pragma aux SDL_AbortAssertion aborts;
+#endif
+static void SDL_AbortAssertion(void)
 {
     SDL_Quit();
     SDL_ExitProcess(42);

--
Gitblit v1.9.3