mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Make XGD extension
This commit is contained in:
@@ -1496,8 +1496,6 @@ namespace MPF.Aaru
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.BluRay:
|
||||
bool xgd = (this.System == KnownSystem.MicrosoftXBOX || this.System == KnownSystem.MicrosoftXBOX360);
|
||||
|
||||
// Get the individual hash data, as per internal
|
||||
if (GetISOHashValues(info.TracksAndWriteOffsets.ClrMameProData, out long size, out string crc32, out string md5, out string sha1))
|
||||
{
|
||||
|
||||
@@ -1849,8 +1849,6 @@ namespace MPF.DiscImageCreator
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.BluRay:
|
||||
bool xgd = (this.System == KnownSystem.MicrosoftXBOX || this.System == KnownSystem.MicrosoftXBOX360);
|
||||
|
||||
// Get the individual hash data, as per internal
|
||||
if (GetISOHashValues(info.TracksAndWriteOffsets.ClrMameProData, out long size, out string crc32, out string md5, out string sha1))
|
||||
{
|
||||
@@ -1863,7 +1861,7 @@ namespace MPF.DiscImageCreator
|
||||
// Deal with the layerbreaks
|
||||
if (this.Type == MediaType.DVD)
|
||||
{
|
||||
string layerbreak = GetLayerbreak(basePath + "_disc.txt", xgd) ?? "";
|
||||
string layerbreak = GetLayerbreak(basePath + "_disc.txt", System.IsXGD()) ?? "";
|
||||
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
}
|
||||
else if (this.Type == MediaType.BluRay)
|
||||
@@ -1879,11 +1877,6 @@ namespace MPF.DiscImageCreator
|
||||
if (layerbreak3 != null && layerbreak3 * 2048 < info.SizeAndChecksums.Size)
|
||||
info.SizeAndChecksums.Layerbreak3 = layerbreak3.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
string layerbreak = GetLayerbreak(basePath + "_disc.txt", xgd) ?? "";
|
||||
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
}
|
||||
}
|
||||
|
||||
// Read the PVD
|
||||
|
||||
@@ -91,5 +91,24 @@ namespace MPF.Utilities
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determine if a system is considered XGD
|
||||
/// </summary>
|
||||
/// <param name="system">KnownSystem value to check</param>
|
||||
/// <returns>True if the system is XGD, false otherwise</returns>
|
||||
public static bool IsXGD(this KnownSystem? system)
|
||||
{
|
||||
switch (system)
|
||||
{
|
||||
case KnownSystem.MicrosoftXBOX:
|
||||
case KnownSystem.MicrosoftXBOX360:
|
||||
case KnownSystem.MicrosoftXBOXOne:
|
||||
case KnownSystem.MicrosoftXboxSeriesXS:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user