diff options
Diffstat (limited to 'Source/Core/DiscIO/CompressedBlob.cpp')
| -rw-r--r-- | Source/Core/DiscIO/CompressedBlob.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/CompressedBlob.cpp b/Source/Core/DiscIO/CompressedBlob.cpp index 68edf369e6..680ca8d179 100644 --- a/Source/Core/DiscIO/CompressedBlob.cpp +++ b/Source/Core/DiscIO/CompressedBlob.cpp @@ -173,9 +173,10 @@ bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u return false; } + DiscScrubber disc_scrubber; if (sub_type == 1) { - if (!DiscScrubber::SetupScrub(infile, block_size)) + if (!disc_scrubber.SetupScrub(infile, block_size)) { PanicAlertT("\"%s\" failed to be scrubbed. Probably the image is corrupt.", infile.c_str()); return false; @@ -186,10 +187,7 @@ bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u z_stream z = {}; if (deflateInit(&z, 9) != Z_OK) - { - DiscScrubber::Cleanup(); return false; - } callback(GetStringT("Files opened, ready to compress."), 0, arg); @@ -243,7 +241,7 @@ bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u size_t read_bytes; if (scrubbing) - read_bytes = DiscScrubber::GetNextBlock(inf, in_buf.data()); + read_bytes = disc_scrubber.GetNextBlock(inf, in_buf.data()); else inf.ReadArray(in_buf.data(), header.block_size, &read_bytes); if (read_bytes < header.block_size) @@ -318,7 +316,6 @@ bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u // Cleanup deflateEnd(&z); - DiscScrubber::Cleanup(); if (success) { |
