From 34be878d2aba2ab63ebc5e234a59fb192f4c2de1 Mon Sep 17 00:00:00 2001 From: pal1000 Date: Tue, 19 Nov 2013 15:11:47 +0200 Subject: [PATCH] Automatically resume emulation after memory dump only if the emulation was active beforehand --- Windows/Debugger/CtrlMemView.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Windows/Debugger/CtrlMemView.cpp b/Windows/Debugger/CtrlMemView.cpp index 1b262644f9..6e3d2f28d2 100644 --- a/Windows/Debugger/CtrlMemView.cpp +++ b/Windows/Debugger/CtrlMemView.cpp @@ -435,14 +435,17 @@ 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 { - Core_EnableStepping(true); + Core_EnableStepping(true); //force paused state } DumpMemoryWindow dump(wnd,debugger); dump.exec(); - int resume = MessageBox(wnd,L"Do you want to resume emulation",MB_YESNO); - if (resume == IDYES) Core_EnableStepping(false); + if (!PriorDumpIsPaused) // If emulator wasn't paused before dumping + { + Core_EnableStepping(false);//resume emulation + } break; case ID_MEMVIEW_COPYVALUE_8: