CDVD: reproducing old behavior, boot in BIOS if invalid drive found

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-09-01 09:22:01 +02:00 committed by refractionpcsx2
parent 4df5c0ee1e
commit fd70ddda02
1 changed files with 7 additions and 2 deletions

View File

@ -321,8 +321,13 @@ s32 cdvdDirectReadSector(u32 sector, s32 mode, u8* buffer)
{
static u8 data[2352 * sectors_per_read];
try {
if (sector >= src->GetSectorCount())
return -1;
}
catch(...) {
return -1;
}
// Align to cache block
u32 sector_block = sector & ~(sectors_per_read - 1);