From eaa5d6f88f8e49cca41094fbbfe7b20720b573b0 Mon Sep 17 00:00:00 2001 From: harry Date: Thu, 1 Sep 2022 20:32:51 -0400 Subject: [PATCH] For Qt GUI, added code to update debugger window ASM view when RAM or ROM edits are made from the hex editor. Fixes #508. --- src/drivers/Qt/HexEditor.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/drivers/Qt/HexEditor.cpp b/src/drivers/Qt/HexEditor.cpp index b7f1931c..38473f43 100644 --- a/src/drivers/Qt/HexEditor.cpp +++ b/src/drivers/Qt/HexEditor.cpp @@ -322,6 +322,8 @@ static void PalettePoke(uint32 addr, uint8 data) //---------------------------------------------------------------------------- static int writeMem( int mode, unsigned int addr, int value ) { + bool updateDebugger = false; + value = value & 0x000000ff; switch ( mode ) @@ -339,6 +341,8 @@ static int writeMem( int mode, unsigned int addr, int value ) { wfunc ((uint32) addr, (uint8) (value & 0x000000ff)); + + updateDebugger = true; } } else @@ -384,23 +388,32 @@ static int writeMem( int mode, unsigned int addr, int value ) { *(uint8 *)(GetNesCHRPointer(addr-16-PRGsize[0])) = value; } + updateDebugger = true; } break; } hexEditorRequestUpdateAll(); - return 0; + if ( updateDebugger ) + { + if (debuggerWindowIsOpen()) + { + updateAllDebuggerWindows(); + } + } + + return 0; } //---------------------------------------------------------------------------- static int convToXchar( int i ) { - int c = 0; + int c = 0; if ( (i >= 0) && (i < 10) ) { - c = i + '0'; + c = i + '0'; } else if ( i < 16 ) {