Merge pull request #936 from aaru-dps/fakeshemp/fix-blocks-to-read

Return blocksToRead if omnidrive and not nintendo disc
This commit is contained in:
2026-05-02 00:56:27 +01:00
committed by GitHub

View File

@@ -592,18 +592,20 @@ sealed partial class Reader
if(_dev.IsOmniDriveFirmware())
{
bool omniStandardOk = !_dev.OmniDriveReadRawDvd(out _, out senseBuf, 0, 1, _timeout, out _, true, true);
bool omniNintendoOk = !_dev.OmniDriveReadNintendoDvd(out _,
out senseBuf,
0,
1,
_timeout,
out _,
true,
true,
null,
false,
0);
OmniDriveReadRaw = omniStandardOk || omniNintendoOk;
OmniDriveReadRaw = omniStandardOk
? true
: !_dev.OmniDriveReadNintendoDvd(out _,
out senseBuf,
0,
1,
_timeout,
out _,
true,
true,
null,
false,
0);
}
if(HldtstReadRaw || _plextorReadRaw || ReadBuffer3CReadRaw || OmniDriveReadRaw)
@@ -709,7 +711,10 @@ sealed partial class Reader
if(HldtstReadRaw || ReadBuffer3CReadRaw)
BlocksToRead = 1;
else if(OmniDriveReadRaw)
{
BlocksToRead = (uint)Math.Min(31, startWithBlocks);
return false;
}
else if(_read6)
{
_dev.Read6(out _, out _, 0, LogicalBlockSize, (byte)BlocksToRead, _timeout, out _);