From 47bc118bdcb5e0b7d6328f2db0b01c169ae86b6b Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 5 Oct 2020 17:34:49 +0200 Subject: [PATCH] Fix slow shutdowns on error SDL_threadID was being compared to int and woudl thus always fail, resulting in the application thinking that another thread was trying to shutdown. --- Source/appfat.cpp | 2 +- Source/appfat.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/appfat.cpp b/Source/appfat.cpp index bdcd83e66..6329ef811 100644 --- a/Source/appfat.cpp +++ b/Source/appfat.cpp @@ -14,7 +14,7 @@ char sz_error_buf[256]; /** Set to true when a fatal error is encountered and the application should shut down. */ BOOL terminating; /** Thread id of the last callee to FreeDlg(). */ -int cleanup_thread_id; +SDL_threadID cleanup_thread_id; /** * @brief Terminates the game and displays an error message box. diff --git a/Source/appfat.h b/Source/appfat.h index f7d06af05..83621607c 100644 --- a/Source/appfat.h +++ b/Source/appfat.h @@ -14,7 +14,6 @@ extern "C" { extern char sz_error_buf[256]; extern BOOL terminating; -extern int cleanup_thread_id; void TriggerBreak(); char *GetErrorStr(DWORD error_code);