diff --git a/Windows/Debugger/CtrlMemView.cpp b/Windows/Debugger/CtrlMemView.cpp index 8bf2c4c3ba..6e3d2f28d2 100644 --- a/Windows/Debugger/CtrlMemView.cpp +++ b/Windows/Debugger/CtrlMemView.cpp @@ -435,17 +435,18 @@ void CtrlMemView::onMouseUp(WPARAM wParam, LPARAM lParam, int button) { case ID_MEMVIEW_DUMP: - if (!Core_IsStepping()) // If emulator isn't paused + bool PriorDumpIsPaused=Core_IsStepping(); + if (!PriorDumpIsPaused) // If emulator isn't paused { - MessageBox(wnd,L"You have to pause the emulator first",0,0); - break; + Core_EnableStepping(true); //force paused state } - else + DumpMemoryWindow dump(wnd,debugger); + dump.exec(); + if (!PriorDumpIsPaused) // If emulator wasn't paused before dumping { - DumpMemoryWindow dump(wnd,debugger); - dump.exec(); - break; + Core_EnableStepping(false);//resume emulation } + break; case ID_MEMVIEW_COPYVALUE_8: { @@ -702,4 +703,4 @@ void CtrlMemView::search(bool continueSearch) MessageBox(wnd,L"Not found",L"Search",MB_OK); searching = false; redraw(); -} \ No newline at end of file +}