Only start/exit the debugger when necessary (don't start it when it's

already going, and don't stop when it isn't).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@512 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-06-16 16:26:27 +00:00
parent 33155b9138
commit 05d67232a6
1 changed files with 5 additions and 3 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Debugger.cxx,v 1.11 2005-06-16 12:28:53 stephena Exp $
// $Id: Debugger.cxx,v 1.12 2005-06-16 16:26:27 stephena Exp $
//============================================================================
#include "bspf.hxx"
@ -259,13 +259,15 @@ const string Debugger::dumpTIA()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Debugger::start()
{
myOSystem->eventHandler().enterDebugMode();
if(myOSystem->eventHandler().state() != EventHandler::S_DEBUGGER)
myOSystem->eventHandler().enterDebugMode();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Debugger::quit()
{
myOSystem->eventHandler().leaveDebugMode();
if(myOSystem->eventHandler().state() == EventHandler::S_DEBUGGER)
myOSystem->eventHandler().leaveDebugMode();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -