ENGINES: Add user support only when autosaving is enabled

Allows autosave file to be:
- deleted,
- manually overwritten,
- tested when autosave fails or produces unexpected results.
This commit is contained in:
macca8 2023-02-27 16:25:40 +11:00 committed by Eugene Sandulenko
parent d507ce499f
commit 414facb1cb

View File

@ -51,9 +51,10 @@ void SaveStateDescriptor::initSaveSlot(const MetaEngine *metaEngine) {
if (autosaveSlot >= 0 && _slot == autosaveSlot) { if (autosaveSlot >= 0 && _slot == autosaveSlot) {
const bool autosaveEnabled = ConfMan.getInt("autosave_period"); const bool autosaveEnabled = ConfMan.getInt("autosave_period");
// If autosaving enabled, do not allow autosave slot to be deleted or overwritten // When autosaving enabled, add user support for managing autosave file.
_isWriteProtected = autosaveEnabled; // If autosaving disabled, do not allow autosave slot to be deleted or overwritten (no changes unless autosave tests are active).
_isDeletable = !autosaveEnabled; _isWriteProtected = !autosaveEnabled;
_isDeletable = autosaveEnabled;
} else { } else {
_isWriteProtected = false; _isWriteProtected = false;
_isDeletable = true; _isDeletable = true;