mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-21 18:31:10 +00:00
fixed savepic loading.
This commit is contained in:
parent
42ab7dd70f
commit
6ff667a490
1 changed files with 9 additions and 1 deletions
|
@ -316,7 +316,15 @@ unsigned FSavegameManagerBase::ExtractSaveData(int index)
|
|||
auto pic = resf->FindEntry("savepic.png");
|
||||
if (pic >= 0)
|
||||
{
|
||||
FileReader picreader = resf->GetEntryReader(pic);
|
||||
FileReader picreader;
|
||||
|
||||
picreader.OpenMemoryArray([=](std::vector<uint8_t>& array)
|
||||
{
|
||||
auto rd = resf->GetEntryReader(pic, false);
|
||||
array.resize(resf->Length(pic));
|
||||
rd.Read(array.data(), array.size());
|
||||
return true;
|
||||
});
|
||||
PNGHandle *png = M_VerifyPNG(picreader);
|
||||
if (png != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue