From 1d00da98e3224db79b9fba3792603599b6d29d4a Mon Sep 17 00:00:00 2001 From: pal1000 Date: Thu, 21 Nov 2013 15:45:32 +0200 Subject: [PATCH] Pause emulation if needed only when user clicks OK on Dump Memory Window --- Windows/Debugger/DumpMemoryWindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Windows/Debugger/DumpMemoryWindow.cpp b/Windows/Debugger/DumpMemoryWindow.cpp index 4456eb2202..9c6bacb660 100644 --- a/Windows/Debugger/DumpMemoryWindow.cpp +++ b/Windows/Debugger/DumpMemoryWindow.cpp @@ -77,10 +77,12 @@ INT_PTR CALLBACK DumpMemoryWindow::dlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, break; } + bool priorDumpWasStepping = Core_IsStepping(); + if (!priorDumpWasStepping) Core_EnableStepping(true); // If emulator isn't paused force paused state fwrite(Memory::GetPointer(bp->start), 1, bp->size, output); fclose(output); - - MessageBoxA(hwnd,"Done.","Error",MB_OK); + if (!priorDumpWasStepping) Core_EnableStepping(false); // If emulator wasn't paused before memory dump resume emulation automatically. + MessageBoxA(hwnd,"Done.","Information",MB_OK); EndDialog(hwnd,true); } break;