From 18c8a8c54810e3a9fc2d6d9eb4df8d60d4ab3b4e Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 4 Oct 2012 20:58:40 +1000 Subject: [PATCH] Cleaned up notification about breakpoints --- .../User Interface/Notification Class.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Source/Project64/User Interface/Notification Class.cpp b/Source/Project64/User Interface/Notification Class.cpp index 1e37eb566..a61718570 100644 --- a/Source/Project64/User Interface/Notification Class.cpp +++ b/Source/Project64/User Interface/Notification Class.cpp @@ -272,8 +272,19 @@ bool CNotification::ProcessGuiMessages ( void ) const return _hWnd->ProcessGuiMessages(); } -void CNotification::BreakPoint ( const char * File, const int LineNumber ) { - DisplayError("Break point found at\n%s\n%d",File, LineNumber); - - _asm int 3 +void CNotification::BreakPoint ( const char * File, const int LineNumber ) +{ + if (_Settings->LoadBool(Debugger_Enabled)) + { + DisplayError("Break point found at\n%s\n%d",File, LineNumber); + if (IsDebuggerPresent() != 0) + { + DebugBreak(); + } else { + _BaseSystem->CloseCpu(); + } + } else { + DisplayError("Fatal Error: Stopping emulation"); + _BaseSystem->CloseCpu(); + } } \ No newline at end of file