COMMON: Fix build when zlib not present
This commit is contained in:
parent
0dd79669a3
commit
a359ee1316
1 changed files with 4 additions and 0 deletions
|
@ -185,10 +185,14 @@ Common::SeekableReadStream *MacVISEArchive::ArchiveMember::createReadStream() co
|
||||||
//
|
//
|
||||||
// If this turns out to be significant, then this will need to be updated to pass information to the deflate decompressor to
|
// If this turns out to be significant, then this will need to be updated to pass information to the deflate decompressor to
|
||||||
// handle the non-standard behavior.
|
// handle the non-standard behavior.
|
||||||
|
#if defined(USE_ZLIB)
|
||||||
if (!Common::inflateZlibHeaderless(decompressedData, uncompressedSize, &compressedData[0], compressedSize)) {
|
if (!Common::inflateZlibHeaderless(decompressedData, uncompressedSize, &compressedData[0], compressedSize)) {
|
||||||
free(decompressedData);
|
free(decompressedData);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
return nullptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
return new Common::MemoryReadStream(decompressedData, uncompressedSize, DisposeAfterUse::YES);
|
return new Common::MemoryReadStream(decompressedData, uncompressedSize, DisposeAfterUse::YES);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue