[Scummvm-git-logs] scummvm master -> b7a46e97f5c400bcbad688adb7e8c4a7f1073fe5
orgads
orgads at gmail.com
Sat Aug 28 18:36:42 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b7a46e97f5 GUI: Re-enable warning when saving over an older savegame
Commit: b7a46e97f5c400bcbad688adb7e8c4a7f1073fe5
https://github.com/scummvm/scummvm/commit/b7a46e97f5c400bcbad688adb7e8c4a7f1073fe5
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-08-28T21:36:35+03:00
Commit Message:
GUI: Re-enable warning when saving over an older savegame
The assignment back to _saveList is required, because the initial read does
not assign playtime.
In case the slot is empty, querySaveMetaInfos returns an empty description
with saveSlot -1 on most engines, so _saveList[selItem] loses its slot.
Cover this by adding a check.
Reverts 0425dff8245fd07329753a1f9c9cf91b4e79c534.
Changed paths:
gui/saveload-dialog.cpp
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 5f52ed42ba..236ad7073f 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -597,6 +597,8 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
if (selItem >= 0 && _metaInfoSupport) {
SaveStateDescriptor desc = (_saveList[selItem].getLocked() ? _saveList[selItem] : _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()));
+ if (!_saveList[selItem].getLocked() && desc.getSaveSlot() >= 0 && !desc.getDescription().empty())
+ _saveList[selItem] = desc;
isDeletable = desc.getDeletableFlag() && _delSupport;
isWriteProtected = desc.getWriteProtectedFlag() ||
@@ -1114,7 +1116,7 @@ void SaveLoadChooserGrid::updateSaves() {
const uint saveSlot = _saveList[i].getSaveSlot();
SaveStateDescriptor desc = (_saveList[i].getLocked() ? _saveList[i] : _metaEngine->querySaveMetaInfos(_target.c_str(), saveSlot));
- if (!_saveList[i].getLocked())
+ if (!_saveList[i].getLocked() && desc.getSaveSlot() >= 0 && !desc.getDescription().empty())
_saveList[i] = desc;
SlotButton &curButton = _buttons[curNum];
curButton.setVisible(true);
More information about the Scummvm-git-logs
mailing list