mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 22:42:07 +00:00
fixed: The savegame's PNG loader must use a caching FileReader to avoid holding a handle to the containing file.
This blocked savegame deletion.
This commit is contained in:
parent
81dade9ed5
commit
f2d582f680
1 changed files with 2 additions and 1 deletions
|
@ -316,7 +316,8 @@ unsigned FSavegameManagerBase::ExtractSaveData(int index)
|
|||
auto pic = resf->FindEntry("savepic.png");
|
||||
if (pic >= 0)
|
||||
{
|
||||
FileReader picreader = resf->GetEntryReader(pic, FileSys::READER_NEW, FileSys::READERFLAG_SEEKABLE);
|
||||
// This must use READER_CACHED or it will lock the savegame file.
|
||||
FileReader picreader = resf->GetEntryReader(pic, FileSys::READER_CACHED, FileSys::READERFLAG_SEEKABLE);
|
||||
PNGHandle *png = M_VerifyPNG(picreader);
|
||||
if (png != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue