From cc50688bf962f15d9dbe6f029e05111654dbd332 Mon Sep 17 00:00:00 2001 From: mpohoreski Date: Sun, 31 Aug 2008 01:06:43 +0000 Subject: [PATCH] bugfixes: .2 Fixed 'G' to not send the Return of the command into the Apple Keyboard .1 Renamed GO to G to not conflict with GR, GR1, GR2 --- source/Debug.cpp | 7 +++++-- source/Debug.h | 5 ++++- source/Frame.cpp | 7 ++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/source/Debug.cpp b/source/Debug.cpp index ed70f1e8..832afdbf 100644 --- a/source/Debug.cpp +++ b/source/Debug.cpp @@ -43,11 +43,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // TODO: COLOR LOAD ["filename"] // See Debugger_Changelong.txt for full details - const int DEBUGGER_VERSION = MAKE_VERSION(2,6,0,0); + const int DEBUGGER_VERSION = MAKE_VERSION(2,6,0,2); // Public _________________________________________________________________________________________ +// All (Global) + bool g_bDebuggerEatKey = false; // Bookmarks __________________________________________________________________ // vector g_aBookmarks; @@ -138,7 +140,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {TEXT("A") , CmdAssemble , CMD_ASSEMBLE , "Assemble instructions" }, {TEXT("BRK") , CmdBreakInvalid , CMD_BREAK_INVALID , "Enter debugger on BRK or INVALID" }, {TEXT("BRKOP") , CmdBreakOpcode , CMD_BREAK_OPCODE , "Enter debugger on opcode" }, - {TEXT("GO") , CmdGo , CMD_GO , "Run [until PC = address]" }, + {TEXT("G") , CmdGo , CMD_GO , "Run [until PC = address]" }, {TEXT("IN") , CmdIn , CMD_IN , "Input byte from IO $C0xx" }, {TEXT("KEY") , CmdKey , CMD_INPUT_KEY , "Feed key into emulator" }, {TEXT("JSR") , CmdJSR , CMD_JSR , "Call sub-routine" }, @@ -2433,6 +2435,7 @@ Update_t CmdGo (int nArgs) // if (!g_nDebugStepUntil) // g_nDebugStepUntil = GetAddress(g_aArgs[1].sArg); + g_bDebuggerEatKey = true; g_nAppMode = MODE_STEPPING; FrameRefreshStatus(DRAW_TITLE); diff --git a/source/Debug.h b/source/Debug.h index a4378712..c797c4b5 100644 --- a/source/Debug.h +++ b/source/Debug.h @@ -15,6 +15,9 @@ using namespace std; // Globals __________________________________________________________________ +// All (Global) + extern bool g_bDebuggerEatKey; + // Benchmarking extern DWORD extbench; @@ -52,7 +55,7 @@ using namespace std; extern bool g_bDisasmCurBad ; extern int g_nDisasmCurLine ; // Aligned to Top or Center - extern int g_iDisasmCurState ; + extern int g_iDisasmCurState ; extern int g_nDisasmWinHeight; diff --git a/source/Frame.cpp b/source/Frame.cpp index daebd840..f5d97038 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -594,7 +594,12 @@ LRESULT CALLBACK FrameWndProc ( if ((g_nAppMode == MODE_RUNNING) || (g_nAppMode == MODE_LOGO) || ((g_nAppMode == MODE_STEPPING) && (wparam != TEXT('\x1B')))) { - KeybQueueKeypress((int)wparam,ASCII); + if( !g_bDebuggerEatKey ) + { + KeybQueueKeypress((int)wparam,ASCII); + } else { + g_bDebuggerEatKey = false; + } } else if ((g_nAppMode == MODE_DEBUG) || (g_nAppMode == MODE_STEPPING))