[Scummvm-tracker] [ScummVM :: Bugs] #13432: GUI: Options dialog complains about non-existing saves in autosave slot
ScummVM :: Bugs
trac at scummvm.org
Mon May 23 08:56:18 UTC 2022
#13432: GUI: Options dialog complains about non-existing saves in autosave slot
-------------------------+--------------------------
Reporter: eriktorbjorn | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Common
Version: | Resolution:
Keywords: | Game: Future Wars
-------------------------+--------------------------
Comment (by macca8):
Sorry for the delay in getting back to you, but thanks for your feedback!
This clarifies the current situation nicely, confirming that it’s a bug
with monitoring the dummy autosave.
Fortunately, I may have stumbled onto the optimal solution, which, unlike
my suggestion in comment:3, applies globally to any engines with
customised dummy autosaves, without needing to make any changes to those
engines.
The clue is in PR’s 3261 & 3301, which created the regression by removing
the SaveType-test from saveAutosaveIfEnabled(), replacing it by
prioritising the name-test as the goto test for triggering the new in-game
& Options warning dialogs.
The solution is to add back the SaveType-test (by calling isAutosave()),
except this time it should be called after the name-test (i.e. after
hasAutosaveName()).
Probably doesn’t matter with the Options dialog because all tests have to
be completed, but testing for the in-game dialog need only continue until
one of the tests returns true (which requires tests to be completed in a
logical order).
Following this change, hasAutosaveName() will continue to test the dummy
autosave, but if it returns false, it will be offset by isAutosave()
returning true (if autosaving is enabled), eliminating it from any
possible inclusion in either dialog.
The overall effect of this is that the dummy autosave is ignored when
autosaving, regardless of it’s name, as it should be. It has no adverse
effect on user saves as they always return a SaveType of false.
There’s only one change required for each dialog, and the location and
proposed change for each are as follows:
in-game warning dialog -
engines/engine.cpp/warnBeforeOverwritingAutosave(), change L569:
{{{
if (!desc.isValid() || desc.hasAutosaveName() || desc.isAutosave())
}}}
Options warning dialog - gui/options.cpp/updateAutosavePeriod(), change
L2558:
{{{
if (desc.getSaveSlot() != -1 && !desc.getDescription().empty() &&
!desc.hasAutosaveName() && !desc.isAutosave())
}}}
It’s a pretty trivial fix by your standards, but I haven’t been able to
test this, so if you agree with what I’ve proposed, and can find the time,
please consider implementing it as a viable solution.
Thanks for your interest.
--
Ticket URL: <https://bugs.scummvm.org/ticket/13432#comment:7>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list