From 3c5531a0914880012bc7cd652bdc5d86399c2f61 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Wed, 13 Nov 2024 18:26:58 +0200 Subject: [PATCH] fixed pkg with zlib_comp mode --- src/core/file_format/pkg.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/file_format/pkg.cpp b/src/core/file_format/pkg.cpp index 0ae9f57eb..1aac2f7a7 100644 --- a/src/core/file_format/pkg.cpp +++ b/src/core/file_format/pkg.cpp @@ -1,31 +1,31 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include +#include #include "common/io_file.h" #include "common/logging/formatter.h" #include "core/file_format/pkg.h" #include "core/file_format/pkg_type.h" -static void DecompressPFSC(std::span compressed_data, +static void DecompressPFSC(std::span compressed_data, std::span decompressed_data) { - zng_stream decompressStream; + z_stream decompressStream; decompressStream.zalloc = Z_NULL; decompressStream.zfree = Z_NULL; decompressStream.opaque = Z_NULL; - if (zng_inflateInit(&decompressStream) != Z_OK) { + if (inflateInit(&decompressStream) != Z_OK) { // std::cerr << "Error initializing zlib for deflation." << std::endl; } decompressStream.avail_in = compressed_data.size(); - decompressStream.next_in = reinterpret_cast(compressed_data.data()); + decompressStream.next_in = reinterpret_cast(compressed_data.data()); decompressStream.avail_out = decompressed_data.size(); - decompressStream.next_out = reinterpret_cast(decompressed_data.data()); + decompressStream.next_out = reinterpret_cast(decompressed_data.data()); - if (zng_inflate(&decompressStream, Z_FINISH)) { + if (inflate(&decompressStream, Z_FINISH)) { } - if (zng_inflateEnd(&decompressStream) != Z_OK) { + if (inflateEnd(&decompressStream) != Z_OK) { // std::cerr << "Error ending zlib inflate" << std::endl; } }