シリアルNo.のチェックを無視できるように

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@720 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
N2614 2013-02-22 00:46:07 +00:00
parent 432b756ce5
commit 9b28440b04
3 changed files with 14 additions and 3 deletions

View File

@ -57,6 +57,8 @@ bool s_SkipNupMode = false;
bool s_DownloadPreinstallMode = false;
// 強制プリインストール書き込みモードかどうか
bool s_ForceDownloadPreinstall = false;
// シリアルNo.のチェックを無視するかどうか
bool s_IgnoreSerialNoCheck = false;
// 失敗サウンドを鳴らしたかどうか
bool s_PlayedFailSound = false;
@ -310,6 +312,13 @@ void CheckSerialNumber(common::HardwareStateManager& manager, common::OperationM
return;
}
// シリアルNo.のチェックを無視するか?
if (s_IgnoreSerialNoCheck)
{
s_RestoreState = IMPORT_RTC;
return;
}
u8 serialInSd[nn::cfg::CTR::CFG_SECURE_INFO_SERIAL_NO_LEN];
nn::Result result = ReadSerialNumber(serialInSd);
if (result.IsFailure())
@ -781,7 +790,7 @@ bool CheckAndReadAPSetting(common::OperationMessage& operationMessage)
if (!s_ReadSettingDone)
{
s_ReadSettingDone = true;
s_ReadSettingIsSuccess = ReadSetting(&s_NupOnlyMode, &s_GetIvsOnlyMode, &s_CheckSdOnlyMode, &s_SkipNupMode, &s_DownloadPreinstallMode);
s_ReadSettingIsSuccess = ReadSetting(&s_NupOnlyMode, &s_GetIvsOnlyMode, &s_CheckSdOnlyMode, &s_SkipNupMode, &s_DownloadPreinstallMode, &s_IgnoreSerialNoCheck);
}
if (s_NupOnlyMode && s_GetIvsOnlyMode
@ -2063,6 +2072,7 @@ void InitializeState()
s_GetIvsOnlyMode = false;
s_CheckSdOnlyMode = false;
s_SkipNupMode = false;
s_IgnoreSerialNoCheck = false;
s_ExecutePreparePreinstallTitleDownload = false;
s_ExecutePreinstallTitleDownload = false;
s_PreinstallTitleDownloadSuccess = false;

View File

@ -1149,7 +1149,7 @@ void ReadSettingFlag(common::ConfigFileLoader* loader, const wchar_t* paramName,
}
}
bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall)
bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall, bool* ignoreSerial)
{
nn::Result result;
bool retval = true;
@ -1456,6 +1456,7 @@ bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool
ReadSettingFlag(&configfileLoader, L"CHECK_SD", checkSd, "CHECK SD Mode.\n");
ReadSettingFlag(&configfileLoader, L"SKIP_NUP", skipNup, "Skip NUP Mode.\n");
ReadSettingFlag(&configfileLoader, L"DL_PREINSTALL", dlPreinstall, "Download PreInstall Application Mode.\n");
ReadSettingFlag(&configfileLoader, L"IGNORE_SERIAL", ignoreSerial, "Ignore Serial No. mismatch.\n");
configfileLoader.Finalize();

View File

@ -111,7 +111,7 @@ struct TimeZone
};
// ネットワーク設定ファイルを読み込む
bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall);
bool ReadSetting(bool* nupOnly, bool* getIvs, bool* checkSd, bool* skipNup, bool* dlPreinstall, bool* ignoreSerial);
// ネットワーク設定ファイルからNTPサーバの名前を取得する
// 先にReadSettingが成功している必要がある