mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix regression in zip texture packs
Can't seek in compressed zips. Let's add a comment too to not do this again. Thanks Nukem for debugging.
This commit is contained in:
parent
2e297426e9
commit
e67b673e4e
1 changed files with 4 additions and 1 deletions
|
@ -290,8 +290,11 @@ VFSOpenFile *ZipFileReader::OpenFileForRead(VFSFileReference *vfsReference, size
|
|||
void ZipFileReader::Rewind(VFSOpenFile *vfsOpenFile) {
|
||||
ZipFileReaderOpenFile *file = (ZipFileReaderOpenFile *)vfsOpenFile;
|
||||
_assert_(file);
|
||||
// Unless the zip file is compressed, can't seek directly, so we re-open.
|
||||
// This version of libzip doesn't even have zip_file_is_seekable(), should probably upgrade.
|
||||
zip_fclose(file->zf);
|
||||
file->zf = zip_fopen_index(zip_file_, file->reference->zi, 0);
|
||||
_dbg_assert_(file->zf != nullptr);
|
||||
zip_fseek(file->zf, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
size_t ZipFileReader::Read(VFSOpenFile *vfsOpenFile, void *buffer, size_t length) {
|
||||
|
|
Loading…
Add table
Reference in a new issue