From 05d67232a6c16c24d185a41444e8dca4da4920b1 Mon Sep 17 00:00:00 2001 From: stephena Date: Thu, 16 Jun 2005 16:26:27 +0000 Subject: [PATCH] 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 --- stella/src/debugger/Debugger.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stella/src/debugger/Debugger.cxx b/stella/src/debugger/Debugger.cxx index c9137756f..e12dcc696 100644 --- a/stella/src/debugger/Debugger.cxx +++ b/stella/src/debugger/Debugger.cxx @@ -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(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -