mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Diskdupe] Change to little endian marshaller (uses only bytes)
This commit is contained in:
@@ -77,7 +77,7 @@ public sealed partial class DiskDupe
|
|||||||
for(int i = 0; i < numTracks; i++)
|
for(int i = 0; i < numTracks; i++)
|
||||||
{
|
{
|
||||||
stream.EnsureRead(buffer, 0, 6);
|
stream.EnsureRead(buffer, 0, 6);
|
||||||
trackMap[i] = Marshal.ByteArrayToStructureBigEndian<TrackInfo>(buffer);
|
trackMap[i] = Marshal.ByteArrayToStructureLittleEndian<TrackInfo>(buffer);
|
||||||
trackOffsets[i] = trackLen * trackMap[i].trackNumber;
|
trackOffsets[i] = trackLen * trackMap[i].trackNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,12 +106,12 @@ public sealed partial class DiskDupe
|
|||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
struct TrackInfo
|
struct TrackInfo
|
||||||
{
|
{
|
||||||
public readonly byte present; // 1 = present, 0 = absent
|
public byte present; // 1 = present, 0 = absent
|
||||||
public readonly byte trackNumber;
|
public byte trackNumber;
|
||||||
public readonly byte zero1;
|
public byte zero1;
|
||||||
public readonly byte zero2;
|
public byte zero2;
|
||||||
public readonly byte zero3;
|
public byte zero3;
|
||||||
public readonly byte unknown; // always 1?
|
public byte unknown; // always 1?
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user