diff options
author | Adrian Frühwirth | 2018-05-01 22:34:00 +0200 |
---|---|---|
committer | Adrian Frühwirth | 2018-05-01 22:34:00 +0200 |
commit | 7b48934598d448a8d3ccf8bfdd0e954862b7fcfe (patch) | |
tree | 40714ca9b441ff6729f80c1a08eac7ab8854ce87 /engines | |
parent | 535034d6b96e2adc6c189fce0a5cf7d5fd618224 (diff) | |
download | scummvm-rg350-7b48934598d448a8d3ccf8bfdd0e954862b7fcfe.tar.gz scummvm-rg350-7b48934598d448a8d3ccf8bfdd0e954862b7fcfe.tar.bz2 scummvm-rg350-7b48934598d448a8d3ccf8bfdd0e954862b7fcfe.zip |
SCUMM: Protect autosave (slot 0) from deletion/overwriting
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/detection.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 37302e31d7..9573db55cd 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -1324,6 +1324,14 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int } SaveStateDescriptor desc(slot, saveDesc); + + // Do not allow save slot 0 (used for auto-saving) to be deleted or + // overwritten. + if (slot == 0) { + desc.setWriteProtectedFlag(true); + desc.setDeletableFlag(false); + } + desc.setThumbnail(thumbnail); if (infoPtr) { |