mirror of
https://github.com/PabloMK7/citra.git
synced 2025-11-03 15:18:47 +00:00
common: Add more robust ZSTD handling. (#7071)
This commit is contained in:
parent
07839fb3ce
commit
4c59443ed2
3 changed files with 35 additions and 8 deletions
|
|
@ -206,6 +206,10 @@ ShaderDiskCache::LoadPrecompiledFile(FileUtil::IOFile& file, bool compressed) {
|
|||
if (compressed) {
|
||||
const std::vector<u8> decompressed =
|
||||
Common::Compression::DecompressDataZSTD(precompiled_file);
|
||||
if (decompressed.empty()) {
|
||||
LOG_ERROR(Render_OpenGL, "Could not decompress precompiled shader cache.");
|
||||
return std::nullopt;
|
||||
}
|
||||
SaveArrayToPrecompiled(decompressed.data(), decompressed.size());
|
||||
} else {
|
||||
SaveArrayToPrecompiled(precompiled_file.data(), precompiled_file.size());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue