From 08d91fe9058ff0ab7bac5d0bbbcf2df61c64dd87 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 25 Jan 2004 01:55:32 +0000 Subject: [PATCH] call DebugBreak on fatal error in _WINDOWS --- stepmania/src/global.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stepmania/src/global.h b/stepmania/src/global.h index a504144251..e2705932b9 100644 --- a/stepmania/src/global.h +++ b/stepmania/src/global.h @@ -87,7 +87,12 @@ namespace Checkpoints #endif /* The infinite loop isn't actually reached; it's just there to shut up a warning. */ -static inline void NORETURN sm_crash() { *(char*)0=0; while(1) ; } +#ifdef _WINDOWS + #include "windows.h" + static inline void NORETURN sm_crash() { DebugBreak(); } // throws an exception that gets caught by the exception handler +#else + static inline void NORETURN sm_crash() { *(char*)0=0; while(1); } +#endif /* Assertion that sets an optional message and brings up the crash handler, so * we get a backtrace. This should probably be used instead of throwing an