mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 22:25:42 +00:00
CDROM: Fix read error/unlicensed flag getting set on all discs
Regression from 75aa52ab06
.
This commit is contained in:
parent
75aa52ab06
commit
04a187afb2
|
@ -248,7 +248,7 @@ bool CDROM::DoesMediaRegionMatchConsole() const
|
||||||
if (!g_settings.cdrom_region_check)
|
if (!g_settings.cdrom_region_check)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return System::GetRegion() != System::GetConsoleRegionForDiscRegion(m_disc_region);
|
return System::GetRegion() == System::GetConsoleRegionForDiscRegion(m_disc_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDROM::InsertMedia(std::unique_ptr<CDImage> media)
|
void CDROM::InsertMedia(std::unique_ptr<CDImage> media)
|
||||||
|
@ -1772,7 +1772,12 @@ void CDROM::DoIDRead()
|
||||||
m_current_lba = 0;
|
m_current_lba = 0;
|
||||||
m_reader.QueueReadSector(0);
|
m_reader.QueueReadSector(0);
|
||||||
|
|
||||||
if (!IsMediaPS1Disc() || (g_settings.cdrom_region_check && !DoesMediaRegionMatchConsole()))
|
if (!IsMediaPS1Disc())
|
||||||
|
{
|
||||||
|
stat_byte |= STAT_ID_ERROR;
|
||||||
|
flags_byte |= (1 << 7) | (1 << 4); // Unlicensed + Audio CD
|
||||||
|
}
|
||||||
|
else if (!DoesMediaRegionMatchConsole())
|
||||||
{
|
{
|
||||||
stat_byte |= STAT_ID_ERROR;
|
stat_byte |= STAT_ID_ERROR;
|
||||||
flags_byte |= (1 << 7); // Unlicensed
|
flags_byte |= (1 << 7); // Unlicensed
|
||||||
|
|
Loading…
Reference in a new issue