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

@ -232,9 +232,9 @@ FileSystemGCWii::FileSystemGCWii(const VolumeDisc* volume, const Partition& part
{
u8 offset_shift;
// Check if this is a GameCube or Wii disc
if (volume->ReadSwapped<u32>(0x18, partition) == u32(0x5D1C9EA3))
if (volume->ReadSwapped<u32>(0x18, partition) == WII_DISC_MAGIC)
offset_shift = 2; // Wii file system
else if (volume->ReadSwapped<u32>(0x1c, partition) == u32(0xC2339F3D))
else if (volume->ReadSwapped<u32>(0x1c, partition) == GAMECUBE_DISC_MAGIC)
offset_shift = 0; // GameCube file system
else
return; // Invalid partition (maybe someone removed its data but not its partition table entry)