mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
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:
parent
ab3f397e2d
commit
b1b83ac954
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user