summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r--src/emu/debug/debugcmd.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index c3b794fd525..c14d74a4299 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -1646,21 +1646,16 @@ void debugger_commands::execute_stateload(int ref, const std::vector<std::string
void debugger_commands::execute_rewind(int ref, const std::vector<std::string> &params)
{
- if (!m_machine.save().rewind()->enabled())
- {
- m_console.printf("Rewind not enabled\n");
- return;
- }
-
- m_machine.rewind_step();
-
- // clear all PC & memory tracks
- for (device_t &device : device_iterator(m_machine.root_device()))
- {
- device.debug()->track_pc_data_clear();
- device.debug()->track_mem_data_clear();
- }
- m_console.printf("Rewind step attempted. Please refer to window message popup for results.\n");
+ bool success = m_machine.rewind_step();
+ if (success)
+ // clear all PC & memory tracks
+ for (device_t &device : device_iterator(m_machine.root_device()))
+ {
+ device.debug()->track_pc_data_clear();
+ device.debug()->track_mem_data_clear();
+ }
+ else
+ m_console.printf("Rewind error occured. See error.log for details.\n");
}