diff --git a/stepmania/src/RageException.cpp b/stepmania/src/RageException.cpp index c38b40869f..2b181d912f 100644 --- a/stepmania/src/RageException.cpp +++ b/stepmania/src/RageException.cpp @@ -48,7 +48,7 @@ void RageException::Throw( const char *sFmt, ... ) fflush( stdout ); } -#if defined(WINDOWS) && defined(DEBUG) +#if (defined(WINDOWS) && defined(DEBUG)) || defined(_XDBG) if( IsDebuggerPresent() ) DebugBreak(); #endif diff --git a/stepmania/src/archutils/Xbox/arch_setup.h b/stepmania/src/archutils/Xbox/arch_setup.h index ead219d484..63bb0151bc 100644 --- a/stepmania/src/archutils/Xbox/arch_setup.h +++ b/stepmania/src/archutils/Xbox/arch_setup.h @@ -5,6 +5,11 @@ #include #include +#if defined(_XDBG) +#include +#define IsDebuggerPresent() DmIsDebuggerPresent() +#endif + // Xbox base path #define SYS_BASE_PATH "D:\\" diff --git a/stepmania/src/global.cpp b/stepmania/src/global.cpp index a6bbe1d8ed..4c286083f8 100644 --- a/stepmania/src/global.cpp +++ b/stepmania/src/global.cpp @@ -10,7 +10,7 @@ # include "archutils/Darwin/Crash.h" using CrashHandler::IsDebuggerPresent; using CrashHandler::DebugBreak; -#elif defined(_XBOX) +#elif defined(_XDBG) #else # include #endif @@ -21,7 +21,7 @@ using CrashHandler::DebugBreak; void NORETURN sm_crash( const char *reason ) { -#if ( defined(_WINDOWS) && defined(CRASH_HANDLER) ) || defined(MACOSX) +#if ( defined(_WINDOWS) && defined(CRASH_HANDLER) ) || defined(MACOSX) || defined(_XDBG) /* If we're being debugged, throw a debug break so it'll suspend the process. */ if( IsDebuggerPresent() ) {