windows: Restore patches for Task Dialogs and TerminateProcess().

2.0.8 has shipped, these can live in revision control now!
This commit is contained in:
Ryan C. Gordon 2018-03-02 14:10:25 -05:00
parent 003c0dce9c
commit cef1c1c2ee
3 changed files with 280 additions and 4 deletions

View file

@ -123,7 +123,11 @@ static void SDL_GenerateAssertionReport(void)
static SDL_NORETURN 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. */