From d9aedd84eb79ee53fd9eefe98bd3bab726a2a9e0 Mon Sep 17 00:00:00 2001 From: zilmar Date: Wed, 4 Apr 2018 03:28:46 +1000 Subject: [PATCH] [Debugger] When changing memory in viewer, clear memory based of physical address --- .../UserInterface/Debugger/Debugger-ViewMemory.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp b/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp index 3f4187d02..dc8860f46 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp @@ -371,13 +371,9 @@ LRESULT CDebugMemoryView::OnMemoryModified(LPNMHDR lpNMHDR) ProtectMemory(ROM, g_Rom->GetRomSize(), MEM_READONLY); } } - if (g_Recompiler != NULL && m_DataVAddrr) + if (g_Recompiler != NULL) { - g_Recompiler->ClearRecompCode_Virt((m_DataStartLoc + Pos) & ~0xFFF, 0x1000, CRecompiler::Remove_MemViewer); - } - else if (g_Recompiler != NULL) - { - g_Recompiler->ClearRecompCode_Phys((m_DataStartLoc + Pos) & ~0xFFF, 0x1000, CRecompiler::Remove_MemViewer); + g_Recompiler->ClearRecompCode_Phys(PhysicalAddress & ~0xFFF, 0x1000, CRecompiler::Remove_MemViewer); } } __except_catch()