Revert "TITANIC: Fix memory leak due to save thumbnail changes"

This was a miss in commit 00e59a3122. The new parameter was supposed
to be called skipThumbnail and default to true instead.
For consistency's sake (the rest of the tree uses skipThumbnail, not
loadThumbnail) I'm reverting this and will separately update the
declaration to how it should have been from the beginning.

Thanks dreammaster!
This commit is contained in:
Adrian Frühwirth 2018-04-22 22:13:45 +02:00
parent ab3f397e2d
commit b1b83ac954
2 changed files with 3 additions and 3 deletions

View File

@ -495,7 +495,7 @@ SaveStateList CProjectItem::getSavegameList(const Common::String &target) {
return saveList;
}
bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &header, bool loadThumbnail) {
bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &header, bool skipThumbnail) {
char saveIdentBuffer[SAVEGAME_STR_SIZE + 1];
header._thumbnail = nullptr;
header._totalFrames = 0;
@ -518,7 +518,7 @@ bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &h
while ((ch = (char)file->readByte()) != '\0') header._saveName += ch;
// Get the thumbnail
if (!Graphics::loadThumbnail(*file, header._thumbnail, !loadThumbnail))
if (!Graphics::loadThumbnail(*file, header._thumbnail, skipThumbnail))
return false;
// Read in save date/time

View File

@ -156,7 +156,7 @@ SaveStateDescriptor TitanicMetaEngine::querySaveMetaInfos(const char *target, in
file.open(f);
Titanic::TitanicSavegameHeader header;
if (!Titanic::CProjectItem::readSavegameHeader(&file, header, true)) {
if (!Titanic::CProjectItem::readSavegameHeader(&file, header, false)) {
file.close();
return SaveStateDescriptor();
}