Simplify some conditions in `DskIdentifier.CalculateFormat`

This commit is contained in:
YoshiRulz 2025-06-13 02:28:03 +10:00
parent 69a8899fa6
commit 4ac8d55fb1
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 9 deletions

View File

@ -64,14 +64,7 @@ namespace BizHawk.Emulation.Common
var trk = Tracks[0];
// look for standard speccy bootstart
if (trk.Sectors[0].SectorData != null && trk.Sectors[0].SectorData.Length > 0)
{
if (trk.Sectors[0].SectorData[0] == 0 && trk.Sectors[0].SectorData[1] == 0
&& trk.Sectors[0].SectorData[2] == 40)
{
_possibleIdent = VSystemID.Raw.ZXSpectrum;
}
}
if (trk.Sectors[0].SectorData is [ 0, 0, 40, .. ]) _possibleIdent = VSystemID.Raw.ZXSpectrum;
// search for PLUS3DOS string
foreach (var t in Tracks)
@ -91,7 +84,7 @@ namespace BizHawk.Emulation.Common
}
// check for bootable status
if (trk.Sectors[0].SectorData != null && trk.Sectors[0].SectorData.Length > 0)
if (trk.Sectors[0].SectorData?.Length is not 0)
{
switch (trk.Sectors[0].GetModChecksum256())
{