From e40c819dc299329223e68a3bd487ff7a1a6615f5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 14 Jan 2004 22:18:27 +0000 Subject: [PATCH] cosmetic --- stepmania/src/archutils/Win32/Crash.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/stepmania/src/archutils/Win32/Crash.cpp b/stepmania/src/archutils/Win32/Crash.cpp index d6491ac5c2..e84a233b61 100644 --- a/stepmania/src/archutils/Win32/Crash.cpp +++ b/stepmania/src/archutils/Win32/Crash.cpp @@ -153,15 +153,18 @@ long __stdcall CrashHandler(EXCEPTION_POINTERS *pExc) RageThread::HaltAllThreads( false ); - static bool InHere = false; - if(InHere) + static int InHere = 0; + if( InHere > 0 ) { - /* If we get here, then we've been called recursively, which means - * we crashed. - */ + /* If we get here, then we've been called recursively, which means we crashed. + * If InHere is greater than 1, then we crashed after writing the crash dump; + * say so. */ SetUnhandledExceptionFilter(NULL); MessageBox( NULL, - "The error reporting interface has crashed.\n", + InHere == 1? + "The error reporting interface has crashed.\n": + "The error reporting interface has crashed. However, crashinfo.txt was" + "written successfully to the program directory.\n", "Fatal Error", MB_OK ); #ifdef DEBUG DebugBreak(); @@ -169,7 +172,7 @@ long __stdcall CrashHandler(EXCEPTION_POINTERS *pExc) return EXCEPTION_EXECUTE_HANDLER; } - InHere=true; + ++InHere; ///////////////////////// hFontMono = CreateFont( @@ -202,6 +205,8 @@ long __stdcall CrashHandler(EXCEPTION_POINTERS *pExc) * dump, save it now. */ DoSave(pExc); + ++InHere; + /* Now things get more risky. If we're fullscreen, the window will obscure the * crash dialog. Try to hide the window. We stopped threads above; we need to * resume them now, or ShowWindow will deadlock. Things might blow up here;