CDVD: Fix error propagation from ThreadedFileReader

This commit is contained in:
Stenzek authored and Connor McLaughlin committed 2024-05-17 11:58:01 +10:00
1 parent 431b8b0df6
commit 89c4e2c1a4
2 files changed
+8 -4

No files matched your search

+2 -2
View File
@@ -1271,12 +1271,12 @@ __fi void cdvdReadInterrupt()
if (cdvd.CurrentRetryCnt <= cdvd.RetryCntMax)
{
CDVD_LOG("CDVD read err, retrying... (attempt %d of %d)", cdvd.CurrentRetryCnt, cdvd.RetryCntMax);
ERROR_LOG("CDVD read err, retrying... (attempt {} of {})", cdvd.CurrentRetryCnt, cdvd.RetryCntMax);
cdvd.ReadErr = DoCDVDreadTrack(cdvd.CurrentSector, cdvd.ReadMode);
CDVDREAD_INT(cdvd.ReadTime);
}
else
Console.Error("CDVD READ ERROR, sector = 0x%08x", cdvd.CurrentSector);
ERROR_LOG("CDVD READ ERROR, sector = {}", cdvd.CurrentSector);
return;
}
+6 -2
View File
@@ -89,8 +89,12 @@ int InputIsoFile::FinishRead3(u8* dst, uint mode)
const int ret = m_reader->FinishRead();
m_read_inprogress = false;
if (ret < 0)
return ret;
if (ret <= 0)
{
m_read_lsn = -1;
m_read_count = 0;
return -1;
}
}
int _offset = 0;