Skip to content

Commit

Permalink
eliminate the intermediate reader for the savegame pics.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Dec 14, 2023
1 parent 78a71bb commit 3013239
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/common/menu/savegamemanager.cpp
Expand Up @@ -316,10 +316,7 @@ unsigned FSavegameManagerBase::ExtractSaveData(int index)
auto pic = resf->FindEntry("savepic.png");
if (pic >= 0)
{
FileReader picreader;
// we must create a memory reader copy of the PNG if we want to close the savegame file here.
auto rd = resf->Read(pic);
picreader.OpenMemoryArray(rd);
FileReader picreader = resf->GetEntryReader(pic, true);
PNGHandle *png = M_VerifyPNG(picreader);
if (png != nullptr)
{
Expand Down

0 comments on commit 3013239

Please sign in to comment.