From f7f0fa2d855c889b093b8ffb4739a1971051b10c Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 22 Aug 2020 22:26:55 +0200 Subject: [PATCH] DiscIO: Adjust WIA/RVZ header size heuristic The heuristic was not allocating enough space for Metroid: Other M, at least when using the default settings. (This didn't break the file, it just caused some headers to be placed at the end of the file instead of at the start and wasted a few hundred kilobytes.) --- Source/Core/DiscIO/WIABlob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DiscIO/WIABlob.cpp b/Source/Core/DiscIO/WIABlob.cpp index 94c3fc12c3..3faa4c38c2 100644 --- a/Source/Core/DiscIO/WIABlob.cpp +++ b/Source/Core/DiscIO/WIABlob.cpp @@ -1752,7 +1752,7 @@ WIARVZFileReader::Convert(BlobReader* infile, const VolumeDisc* infile_volu // RVZ's added data in GroupEntry usually compresses well if (RVZ && compression_type > WIARVZCompressionType::Purge) - upper_bound += group_entries_size / 2; + upper_bound += static_cast(group_entries_size) * 9 / 16; else upper_bound += group_entries_size;