mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
DiscIO: Move magic constants for discs to DiscUtils
This commit is contained in:
parent
b14bf82732
commit
7d570f1edb
6 changed files with 13 additions and 14 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue