From 5f8b9e45c072286e3cdaafce34a6136bdf7e422b 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 | 3 ++- Source/appfat.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/appfat.cpp b/Source/appfat.cpp index d9c2b5bf7..2d502b933 100644 --- a/Source/appfat.cpp +++ b/Source/appfat.cpp @@ -6,7 +6,8 @@ DEVILUTION_BEGIN_NAMESPACE char sz_error_buf[256]; BOOL terminating; -int cleanup_thread_id; +/** Thread id of the last callee to FreeDlg(). */ +SDL_threadID cleanup_thread_id; void app_fatal(const char *pszFmt, ...) { diff --git a/Source/appfat.h b/Source/appfat.h index 08ee83373..2cfb7f5cf 100644 --- a/Source/appfat.h +++ b/Source/appfat.h @@ -4,7 +4,6 @@ extern char sz_error_buf[256]; extern BOOL terminating; -extern int cleanup_thread_id; void TriggerBreak(); char *GetErrorStr(DWORD error_code);