mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
System: Disallow booting when SBI files are missing
This commit is contained in:
parent
558978b7f2
commit
fe1a582909
|
@ -1935,15 +1935,27 @@ bool CheckForSBIFile(CDImage* image)
|
|||
Log_WarningPrintf("SBI file missing but required for %s (%s)", s_running_game_code.c_str(),
|
||||
s_running_game_title.c_str());
|
||||
|
||||
return g_host_interface->ConfirmMessage(
|
||||
StringUtil::StdStringFromFormat(
|
||||
if (g_host_interface->GetBoolSettingValue("CDROM", "AllowBootingWithoutSBIFile", false))
|
||||
{
|
||||
return g_host_interface->ConfirmMessage(
|
||||
StringUtil::StdStringFromFormat(
|
||||
g_host_interface->TranslateString(
|
||||
"System",
|
||||
"You are attempting to run a libcrypt protected game without an SBI file:\n\n%s: %s\n\nThe game will "
|
||||
"likely not run properly.\n\nPlease check the README for instructions on how to add an SBI file.\n\nDo "
|
||||
"you wish to continue?"),
|
||||
s_running_game_code.c_str(), s_running_game_title.c_str())
|
||||
.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
g_host_interface->ReportError(SmallString::FromFormat(
|
||||
g_host_interface->TranslateString(
|
||||
"System",
|
||||
"You are attempting to run a libcrypt protected game without an SBI file:\n\n%s: %s\n\nThe game will "
|
||||
"likely not run properly.\n\nPlease check the README for instructions on how to add an SBI file.\n\nDo "
|
||||
"you wish to continue?"),
|
||||
s_running_game_code.c_str(), s_running_game_title.c_str())
|
||||
.c_str());
|
||||
"System", "You are attempting to run a libcrypt protected game without an SBI file:\n\n%s: %s\n\nYour dump is "
|
||||
"incomplete, you must add the SBI file to run this game."),
|
||||
s_running_game_code.c_str(), s_running_game_title.c_str()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool HasMediaSubImages()
|
||||
|
|
|
@ -193,6 +193,9 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface,
|
|||
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Increase Timer Resolution"), "Main",
|
||||
"IncreaseTimerResolution", true);
|
||||
|
||||
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Allow Booting Without SBI File"), "CDROM",
|
||||
"AllowBootingWithoutSBIFile", false);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.logLevel, tr("Log Level"), tr("Information"),
|
||||
tr("Sets the verbosity of messages logged. Higher levels will log more messages."));
|
||||
dialog->registerWidgetHelp(m_ui.logToConsole, tr("Log To System Console"), tr("User Preference"),
|
||||
|
@ -231,4 +234,5 @@ void AdvancedSettingsWidget::onResetToDefaultClicked()
|
|||
setIntRangeTweakOption(m_ui.tweakOptionTable, 17, static_cast<int>(Settings::DEFAULT_GPU_MAX_RUN_AHEAD));
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 18, false);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 19, true);
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, 20, false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue