mirror of https://github.com/PCSX2/pcsx2.git
cdvdgigaherz:windows: Adjust CD read success condition
IOCTL_SCSI_PASS_THROUGH_DIRECT will return success even if the read fails (I'm not sure when it'll return failure). Assume the read is successful only when the read length is correct.
This commit is contained in:
parent
83ffbc2d3d
commit
4ab97be693
|
@ -180,9 +180,8 @@ bool IOCtlSrc::ReadSectors2352(u32 sector, u32 count, u8 *buffer) const
|
|||
DWORD unused;
|
||||
if (DeviceIoControl(m_device, IOCTL_SCSI_PASS_THROUGH_DIRECT, &sptd,
|
||||
sizeof(sptd), &sptd, sizeof(sptd), &unused, nullptr)) {
|
||||
if (sptd.info.DataTransferLength != 2352)
|
||||
printf(" * CDVD: SPTI short transfer of %u bytes", sptd.info.DataTransferLength);
|
||||
continue;
|
||||
if (sptd.info.DataTransferLength == 2352)
|
||||
continue;
|
||||
}
|
||||
printf(" * CDVD: SPTI failed reading sector %u; SENSE %u -", current_sector, sptd.info.SenseInfoLength);
|
||||
for (const auto &c : sptd.sense_buffer)
|
||||
|
|
Loading…
Reference in New Issue