diff options
author | Adrian Frühwirth | 2018-04-21 15:45:34 +0200 |
---|---|---|
committer | Adrian Frühwirth | 2018-04-21 15:45:34 +0200 |
commit | 2bbed8146fec101db4e5f39ba35b2bb2536389c5 (patch) | |
tree | 43f98419c852cd31f0eb0161d8044dac1e7d18f5 /engines/tucker/saveload.cpp | |
parent | 828da1fc206fdc1049f85ff45d3024a47fdee330 (diff) | |
download | scummvm-rg350-2bbed8146fec101db4e5f39ba35b2bb2536389c5.tar.gz scummvm-rg350-2bbed8146fec101db4e5f39ba35b2bb2536389c5.tar.bz2 scummvm-rg350-2bbed8146fec101db4e5f39ba35b2bb2536389c5.zip |
TUCKER: Try autosaving only once per autosave interval
Diffstat (limited to 'engines/tucker/saveload.cpp')
-rw-r--r-- | engines/tucker/saveload.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/tucker/saveload.cpp b/engines/tucker/saveload.cpp index af836593c3..1720e10a2b 100644 --- a/engines/tucker/saveload.cpp +++ b/engines/tucker/saveload.cpp @@ -286,13 +286,16 @@ bool TuckerEngine::isAutosaveAllowed(const char *target) { void TuckerEngine::writeAutosave() { if (canSaveGameStateCurrently()) { + // unconditionally reset last autosave timestamp so we don't start + // hammering the disk in case we can't/don't actually write the file + _lastSaveTime = _system->getMillis(); + if (!isAutosaveAllowed()) { warning("Refusing to overwrite non-autosave savegame in slot %i, skipping autosave", kAutoSaveSlot); return; } writeSavegame(kAutoSaveSlot, "Autosave", true); - _lastSaveTime = _system->getMillis(); } } |