Replace old bigendian marshaller with new one.

This commit is contained in:
2025-10-21 11:43:05 +01:00
parent 061669a255
commit 39f4ca2998
68 changed files with 188 additions and 336 deletions

View File

@@ -130,7 +130,7 @@ public sealed partial class XboxFatPlugin
? Marshal.ByteArrayToStructureLittleEndian<DirectoryEntry>(directoryBuffer,
pos,
Marshal.SizeOf<DirectoryEntry>())
: Marshal.ByteArrayToStructureBigEndianGenerated<DirectoryEntry>(directoryBuffer,
: Marshal.ByteArrayToStructureBigEndian<DirectoryEntry>(directoryBuffer,
pos,
Marshal.SizeOf<DirectoryEntry>());

View File

@@ -48,7 +48,7 @@ public sealed partial class XboxFatPlugin
if(errno != ErrorNumber.NoError) return false;
Superblock sb = Marshal.ByteArrayToStructureBigEndianGenerated<Superblock>(sector);
Superblock sb = Marshal.ByteArrayToStructureBigEndian<Superblock>(sector);
return sb.magic is FATX_MAGIC or FATX_CIGAM;
}
@@ -68,7 +68,7 @@ public sealed partial class XboxFatPlugin
if(errno != ErrorNumber.NoError) return;
Superblock fatxSb = Marshal.ByteArrayToStructureBigEndianGenerated<Superblock>(sector);
Superblock fatxSb = Marshal.ByteArrayToStructureBigEndian<Superblock>(sector);
if(fatxSb.magic == FATX_CIGAM)
{

View File

@@ -69,7 +69,7 @@ public sealed partial class XboxFatPlugin
if(_superblock.magic == FATX_CIGAM)
{
_superblock = Marshal.ByteArrayToStructureBigEndianGenerated<Superblock>(sector);
_superblock = Marshal.ByteArrayToStructureBigEndian<Superblock>(sector);
_littleEndian = false;
}
@@ -233,7 +233,7 @@ public sealed partial class XboxFatPlugin
? Marshal.ByteArrayToStructureLittleEndian<DirectoryEntry>(rootDirectoryBuffer,
pos,
Marshal.SizeOf<DirectoryEntry>())
: Marshal.ByteArrayToStructureBigEndianGenerated<DirectoryEntry>(rootDirectoryBuffer,
: Marshal.ByteArrayToStructureBigEndian<DirectoryEntry>(rootDirectoryBuffer,
pos,
Marshal.SizeOf<DirectoryEntry>());