diff options
| author | 2017-12-12 20:41:38 +0300 | |
|---|---|---|
| committer | 2017-12-22 04:39:14 +0300 | |
| commit | 7e7f2fafd0cd75e1b4771d6b7bb03e88684f19d5 (patch) | |
| tree | e0300d031bccad4683a61cc95dcdf3f5a0c7cd8d /src/emu/machine.cpp | |
| parent | bb0de21e6755b8508b7f002bc15da56bfca68506 (diff) | |
rewind implementation fixes and improvements
- reset scheduler savestate to what it was for years before rewind
-- changing saved variables should be done after thorough testing. right now, adding some vars breaks some machines, adding other vars breaks others
- switch to megabyte-wise capacity
-- savestate size greatly differs between machines, relying on state count is unstable
- switch to internal indexing
-- no longer depends on inaccurate machine time
- rewind accelerator key in debugger (Ctrl+F11)
- report capacity hit (once), with some useful info
- make error reports saner
- mention rewind and rewind_capacity in the docs
Diffstat (limited to 'src/emu/machine.cpp')
| -rw-r--r-- | src/emu/machine.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 48edd645ac1..c8ed052ad98 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -687,10 +687,9 @@ void running_machine::immediate_load(const char *filename) // state to the rewind list //------------------------------------------------- -void running_machine::rewind_capture() +bool running_machine::rewind_capture() { - if (m_save.rewind()->enabled()) - m_save.rewind()->capture(); + return m_save.rewind()->capture(); } @@ -699,10 +698,9 @@ void running_machine::rewind_capture() // rewind states //------------------------------------------------- -void running_machine::rewind_step() +bool running_machine::rewind_step() { - if (m_save.rewind()->enabled()) - m_save.rewind()->step(); + return m_save.rewind()->step(); } @@ -713,8 +711,7 @@ void running_machine::rewind_step() void running_machine::rewind_invalidate() { - if (m_save.rewind()->enabled()) - m_save.rewind()->invalidate(); + m_save.rewind()->invalidate(); } @@ -960,6 +957,9 @@ void running_machine::handle_saveload() if (saverr != STATERR_NONE && m_saveload_schedule == saveload_schedule::SAVE) file.remove_on_close(); } + else if (openflags == OPEN_FLAG_READ && filerr == osd_file::error::NOT_FOUND) + // attempt to load a non-existent savestate, report empty slot + popmessage("Error: No savestate file to load.", opname); else popmessage("Error: Failed to open file for %s operation.", opname); } |
