DiscIO: Move magic constants for discs to DiscUtils

This commit is contained in:
JosJuice
2021-03-09 21:06:57 +01:00
parent b14bf82732
commit 7d570f1edb
6 changed files with 13 additions and 14 deletions

View File

@ -130,10 +130,9 @@ u64 GetBiggestReferencedOffset(const Volume& volume)
// This can happen when certain programs that create WBFS files scrub the entirety of
// the Masterpiece partitions in Super Smash Bros. Brawl without removing them from
// the partition table. https://bugs.dolphin-emu.org/issues/8733
constexpr u32 WII_MAGIC = 0x5D1C9EA3;
const auto it =
std::remove_if(partitions.begin(), partitions.end(), [&](const Partition& partition) {
return volume.ReadSwapped<u32>(0x18, partition) != WII_MAGIC;
return volume.ReadSwapped<u32>(0x18, partition) != WII_DISC_MAGIC;
});
partitions.erase(it, partitions.end());