CDVD: Fix error propagation from ThreadedFileReader

This commit is contained in:
Stenzek 2024-05-16 20:01:45 +10:00 committed by Connor McLaughlin
parent 431b8b0df6
commit 89c4e2c1a4
2 changed files with 8 additions and 4 deletions

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;
}

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;