Changes between Version 3 and Version 4 of Ticket #13432, comment 7
- Timestamp:
- Jun 5, 2022, 5:24:54 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13432, comment 7
v3 v4 3 3 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. 4 4 5 The clue is in PR’s [https://github.com/scummvm/scummvm/pull/3261 3261] & [https://github.com/scummvm/scummvm/pull/3304 3304], 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.5 The clue is in PR’s [https://github.com/scummvm/scummvm/pull/3261 3261] & [https://github.com/scummvm/scummvm/pull/3304 3304], which created the regression by removing isAutosave() (i.e. the SaveType-test) from saveAutosaveIfEnabled() with PR 3261, replacing it by prioritising the name-test as the goto test for triggering the new in-game & Options warning dialogs. 6 6 7 The solution is to add back the SaveType-test (by calling isAutosave()), except this time it should be called afterthe name-test (i.e. after hasAutosaveName()).7 The solution is to restore the SaveType-test for each dialog (by calling isAutosave()), except this time it should be called in addition to, and after, the name-test (i.e. after hasAutosaveName()). 8 8 9 9 The order 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). 10 10 11 Following this change, hasAutosaveName() will continue to test the dummy autosave, but if it returns false, it will be offset by isAutosave() returning true (ifautosaving is enabled), eliminating it from any possible inclusion in either dialog.11 Following this change, hasAutosaveName() will continue to test the dummy autosave, but if this test returns false (i.e. if named other than the default "Autosave"), its status will be corrected by isAutosave() returning true (when autosaving is enabled), eliminating it from any possible inclusion in either dialog. 12 12 13 The overall effect of this is that the dummy autosave is ignored when autosaving, regardless of its name, as it should be . It has no adverse effect on user saves as they always return a SaveType-test result of false.13 The overall effect of this is that the dummy autosave is ignored when autosaving, regardless of its name, as it should be (since it contains no game data that could be lost if overwritten). It has no adverse effect on user-initiated saves as they always return a SaveType-test result of false, regardless of save slot. 14 14 15 15 There’s only one change required for each dialog, and the location and proposed change for each are as follows: