Pause emulation if needed only when user clicks OK on Dump Memory Window

This commit is contained in:
pal1000 committed 2013-11-21 15:45:32 +02:00
1 parent 2f52872eb3
commit 1d00da98e3
1 file changed
+4 -2
+4 -2
View File
@@ -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;