System: Don't try to read SYSTEM.CNF from Audio CD
This commit is contained in:
parent
991927151c
commit
4d74b203af
|
@ -1086,8 +1086,11 @@ DiscRegion System::GetRegionFromSystemArea(CDImage* cdi)
|
|||
{
|
||||
// The license code is on sector 4 of the disc.
|
||||
u8 sector[CDImage::DATA_SECTOR_SIZE];
|
||||
if (!cdi->Seek(1, 4) || cdi->Read(CDImage::ReadMode::DataOnly, 1, sector) != 1)
|
||||
if (cdi->GetTrackMode(1) == CDImage::TrackMode::Audio || !cdi->Seek(1, 4) ||
|
||||
cdi->Read(CDImage::ReadMode::DataOnly, 1, sector) != 1)
|
||||
{
|
||||
return DiscRegion::Other;
|
||||
}
|
||||
|
||||
static constexpr char ntsc_u_string[] = " Licensed by Sony Computer Entertainment Amer ica ";
|
||||
static constexpr char ntsc_j_string[] = " Licensed by Sony Computer Entertainment Inc.";
|
||||
|
|
|
@ -29,6 +29,12 @@ bool IsoReader::Open(CDImage* image, u32 track_number, Error* error)
|
|||
m_image = image;
|
||||
m_track_number = track_number;
|
||||
|
||||
if (image->GetTrackMode(static_cast<u8>(track_number)) == CDImage::TrackMode::Audio)
|
||||
{
|
||||
Error::SetStringFmt(error, "Track {} is an audio track.", track_number);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ReadPVD(error))
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue