disable the buffering file reader.

This was definitely crashing on Death Wish's E1 movie and probably caused other problems as well.
This commit is contained in:
Christoph Oelckers 2024-01-12 00:30:56 +01:00
parent 3299e0b8c0
commit 436f24add5
3 changed files with 3 additions and 3 deletions

View file

@ -564,7 +564,7 @@ void Widget::OnWindowMouseMove(const Point& pos)
{ {
widget->OnMouseMove(widget->MapFrom(this, pos)); widget->OnMouseMove(widget->MapFrom(this, pos));
widget = widget->Parent(); widget = widget->Parent();
} while (widget != this); } while (widget != this && widget != nullptr);
} }
} }

View file

@ -980,7 +980,7 @@ bool OpenDecompressor(FileReader& self, FileReader &parent, FileReader::Size len
} }
dec->Length = length; dec->Length = length;
} }
if ((flags & DCF_CACHED)) if ((flags & (DCF_CACHED| DCF_SEEKABLE))) // the buffering reader does not seem to be stable, so cache it instead until we find out what's wrong.
{ {
// read everything into a MemoryArrayReader. // read everything into a MemoryArrayReader.
FileData data(nullptr, length); FileData data(nullptr, length);

View file

@ -395,7 +395,7 @@ void FileSystem::AddFile (const char *filename, FileReader *filer, LumpFilterInf
std::string path = filename; std::string path = filename;
path += ':'; path += ':';
path += resfile->getName(i); path += resfile->getName(i);
auto embedded = resfile->GetEntryReader(i, READER_NEW, READERFLAG_SEEKABLE); auto embedded = resfile->GetEntryReader(i, READER_CACHED);
AddFile(path.c_str(), &embedded, filter, Printf, hashfile); AddFile(path.c_str(), &embedded, filter, Printf, hashfile);
} }
} }