Patch #2832247: "GMM: Enable loading & deleting of unnamed savegames"

svn-id: r43143
This commit is contained in:
Eugene Sandulenko 2009-08-08 20:16:58 +00:00
parent f805e1b413
commit f45808aeb0

View file

@ -345,7 +345,14 @@ void SaveLoadChooser::updateSaveList() {
}
}
saveNames.push_back(x->description());
// Show "Untitled savestate" for empty/whitespace savegame descriptions
Common::String description = x->description();
Common::String trimmedDescription = description;
trimmedDescription.trim();
if (trimmedDescription.empty())
description = "Untitled savestate";
saveNames.push_back(description);
curSlot++;
}