Changes between Version 3 and Version 4 of Ticket #13432, comment 7


Ignore:
Timestamp:
06/05/22 05:24:54 (23 months ago)
Author:
macca8

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13432, comment 7

    v3 v4  
    33Fortunately, 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.
    44
    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.
     5The 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.
    66
    7 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()).
     7The 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()).
    88
    99The 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).
    1010
    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 (if autosaving is enabled), eliminating it from any possible inclusion in either dialog.
     11Following 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.
    1212
    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.
     13The 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.
    1414
    1515There’s only one change required for each dialog, and the location and proposed change for each are as follows: