mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
Gaps in the list of save games are now handled correctly in the GMM save/load dialogs
svn-id: r34966
This commit is contained in:
parent
bf857a73fe
commit
eee2e68007
@ -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++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user