CDROM: Add "Enable Region Check" option

This commit is contained in:
Connor McLaughlin 2020-04-01 01:48:37 +10:00
parent e36e70a266
commit 15c33ebedb
4 changed files with 7 additions and 2 deletions

View File

@ -1375,8 +1375,9 @@ void CDROM::DoIDRead()
{
flags_byte |= (1 << 6); // Disc Missing
}
else if (m_disc_region == DiscRegion::Other ||
m_system->GetRegion() != System::GetConsoleRegionForDiscRegion(m_disc_region))
else if (m_system->GetSettings().cdrom_region_check &&
(m_disc_region == DiscRegion::Other ||
m_system->GetRegion() != System::GetConsoleRegionForDiscRegion(m_disc_region)))
{
stat_byte |= STAT_ID_ERROR;
flags_byte |= (1 << 7); // Unlicensed

View File

@ -879,6 +879,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
si.SetBoolValue("Display", "VSync", true);
si.SetBoolValue("CDROM", "ReadThread", true);
si.SetBoolValue("CDROM", "RegionCheck", true);
si.SetStringValue("Audio", "Backend", Settings::GetAudioBackendName(AudioBackend::Cubeb));
si.SetBoolValue("Audio", "Sync", true);

View File

@ -40,6 +40,7 @@ void Settings::Load(SettingsInterface& si)
video_sync_enabled = si.GetBoolValue("Display", "VSync", true);
cdrom_read_thread = si.GetBoolValue("CDROM", "ReadThread", true);
cdrom_region_check = si.GetBoolValue("CDROM", "RegionCheck", true);
audio_backend =
ParseAudioBackend(si.GetStringValue("Audio", "Backend", "Cubeb").c_str()).value_or(AudioBackend::Cubeb);
@ -99,6 +100,7 @@ void Settings::Save(SettingsInterface& si) const
si.SetBoolValue("Display", "VSync", video_sync_enabled);
si.SetBoolValue("CDROM", "ReadThread", cdrom_read_thread);
si.SetBoolValue("CDROM", "RegionCheck", cdrom_region_check);
si.SetStringValue("Audio", "Backend", GetAudioBackendName(audio_backend));
si.SetBoolValue("Audio", "Sync", audio_sync_enabled);

View File

@ -61,6 +61,7 @@ struct Settings
bool video_sync_enabled = true;
bool cdrom_read_thread = true;
bool cdrom_region_check = true;
AudioBackend audio_backend = AudioBackend::Cubeb;
bool audio_sync_enabled = true;