Skip to content

Commit

Permalink
disable the buffering file reader.
Browse files Browse the repository at this point in the history
This was definitely crashing on Death Wish's E1 movie and probably caused other problems as well.
  • Loading branch information
coelckers committed Jan 11, 2024
1 parent 3299e0b commit 436f24a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/ZWidget/src/core/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ void Widget::OnWindowMouseMove(const Point& pos)
{
widget->OnMouseMove(widget->MapFrom(this, pos));
widget = widget->Parent();
} while (widget != this);
} while (widget != this && widget != nullptr);
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/common/filesystem/source/files_decompress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ bool OpenDecompressor(FileReader& self, FileReader &parent, FileReader::Size len
}
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.
FileData data(nullptr, length);
Expand Down
2 changes: 1 addition & 1 deletion source/common/filesystem/source/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ void FileSystem::AddFile (const char *filename, FileReader *filer, LumpFilterInf
std::string path = filename;
path += ':';
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);
}
}
Expand Down

0 comments on commit 436f24a

Please sign in to comment.