mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 06:50:29 +02: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:
1 parent
2e297426e9
commit
e67b673e4e
1 file changed
+4
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user