mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-19 14:55:38 +00:00
CDROM: Add "Enable Region Check" option
This commit is contained in:
parent
e36e70a266
commit
15c33ebedb
|
@ -1375,8 +1375,9 @@ void CDROM::DoIDRead()
|
||||||
{
|
{
|
||||||
flags_byte |= (1 << 6); // Disc Missing
|
flags_byte |= (1 << 6); // Disc Missing
|
||||||
}
|
}
|
||||||
else if (m_disc_region == DiscRegion::Other ||
|
else if (m_system->GetSettings().cdrom_region_check &&
|
||||||
m_system->GetRegion() != System::GetConsoleRegionForDiscRegion(m_disc_region))
|
(m_disc_region == DiscRegion::Other ||
|
||||||
|
m_system->GetRegion() != System::GetConsoleRegionForDiscRegion(m_disc_region)))
|
||||||
{
|
{
|
||||||
stat_byte |= STAT_ID_ERROR;
|
stat_byte |= STAT_ID_ERROR;
|
||||||
flags_byte |= (1 << 7); // Unlicensed
|
flags_byte |= (1 << 7); // Unlicensed
|
||||||
|
|
|
@ -879,6 +879,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
|
||||||
si.SetBoolValue("Display", "VSync", true);
|
si.SetBoolValue("Display", "VSync", true);
|
||||||
|
|
||||||
si.SetBoolValue("CDROM", "ReadThread", true);
|
si.SetBoolValue("CDROM", "ReadThread", true);
|
||||||
|
si.SetBoolValue("CDROM", "RegionCheck", true);
|
||||||
|
|
||||||
si.SetStringValue("Audio", "Backend", Settings::GetAudioBackendName(AudioBackend::Cubeb));
|
si.SetStringValue("Audio", "Backend", Settings::GetAudioBackendName(AudioBackend::Cubeb));
|
||||||
si.SetBoolValue("Audio", "Sync", true);
|
si.SetBoolValue("Audio", "Sync", true);
|
||||||
|
|
|
@ -40,6 +40,7 @@ void Settings::Load(SettingsInterface& si)
|
||||||
video_sync_enabled = si.GetBoolValue("Display", "VSync", true);
|
video_sync_enabled = si.GetBoolValue("Display", "VSync", true);
|
||||||
|
|
||||||
cdrom_read_thread = si.GetBoolValue("CDROM", "ReadThread", true);
|
cdrom_read_thread = si.GetBoolValue("CDROM", "ReadThread", true);
|
||||||
|
cdrom_region_check = si.GetBoolValue("CDROM", "RegionCheck", true);
|
||||||
|
|
||||||
audio_backend =
|
audio_backend =
|
||||||
ParseAudioBackend(si.GetStringValue("Audio", "Backend", "Cubeb").c_str()).value_or(AudioBackend::Cubeb);
|
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("Display", "VSync", video_sync_enabled);
|
||||||
|
|
||||||
si.SetBoolValue("CDROM", "ReadThread", cdrom_read_thread);
|
si.SetBoolValue("CDROM", "ReadThread", cdrom_read_thread);
|
||||||
|
si.SetBoolValue("CDROM", "RegionCheck", cdrom_region_check);
|
||||||
|
|
||||||
si.SetStringValue("Audio", "Backend", GetAudioBackendName(audio_backend));
|
si.SetStringValue("Audio", "Backend", GetAudioBackendName(audio_backend));
|
||||||
si.SetBoolValue("Audio", "Sync", audio_sync_enabled);
|
si.SetBoolValue("Audio", "Sync", audio_sync_enabled);
|
||||||
|
|
|
@ -61,6 +61,7 @@ struct Settings
|
||||||
bool video_sync_enabled = true;
|
bool video_sync_enabled = true;
|
||||||
|
|
||||||
bool cdrom_read_thread = true;
|
bool cdrom_read_thread = true;
|
||||||
|
bool cdrom_region_check = true;
|
||||||
|
|
||||||
AudioBackend audio_backend = AudioBackend::Cubeb;
|
AudioBackend audio_backend = AudioBackend::Cubeb;
|
||||||
bool audio_sync_enabled = true;
|
bool audio_sync_enabled = true;
|
||||||
|
|
Loading…
Reference in a new issue