aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorFilippos Karapetis2008-11-09 18:35:26 +0000
committerFilippos Karapetis2008-11-09 18:35:26 +0000
commiteee2e68007edbed6419d2f8630e3c5b777d4ca46 (patch)
tree437c60194796c2bb3006df76454966ccd2b9c61b /gui
parentbf857a73fe69576909045a00f2ec318302ae84fb (diff)
downloadscummvm-rg350-eee2e68007edbed6419d2f8630e3c5b777d4ca46.tar.gz
scummvm-rg350-eee2e68007edbed6419d2f8630e3c5b777d4ca46.tar.bz2
scummvm-rg350-eee2e68007edbed6419d2f8630e3c5b777d4ca46.zip
Gaps in the list of save games are now handled correctly in the GMM save/load dialogs
svn-id: r34966
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index df6869234e..abb083dccd 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -747,8 +747,19 @@ void SaveLoadChooser::updateSaveList() {
_saveList = (*_plugin)->listSaves(_target.c_str());
int curSlot = 0;
+ int saveSlot = 0;
StringList saveNames;
for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) {
+ // Handle gaps in the list of save games
+ saveSlot = atoi(x->save_slot().c_str());
+ while (curSlot < saveSlot) {
+ SaveStateDescriptor dummySave(curSlot, "");
+ _saveList.insert_at(curSlot, dummySave);
+ saveNames.push_back(dummySave.description());
+ ++x; // sync save list pointer
+ curSlot++;
+ }
+
saveNames.push_back(x->description());
curSlot++;
}