mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
IVSのチェックを本体初期化前に移動
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@89 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
2f374a6bb5
commit
e82097d992
@ -272,23 +272,12 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
|
||||
operationMessage.push_back(::std::string("Serial Number in SD : ") + serial);
|
||||
}
|
||||
|
||||
// SDカードにIVSがあるか?
|
||||
if (!ExistsIVSFile())
|
||||
// SDカードに書き込みできるか?
|
||||
if (nextStep && !nn::fs::IsSdmcWritable())
|
||||
{
|
||||
// 移行不能なのでFAIL
|
||||
COMMON_LOGGER("Can't Read IVS in SD Card!!\n");
|
||||
error = true;
|
||||
s_RestoreState = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// SDカードに書き込みできるか?
|
||||
if (nextStep && !nn::fs::IsSdmcWritable())
|
||||
{
|
||||
error = true;
|
||||
PlaySound(SOUND_ANNOTATION);
|
||||
COMMON_LOGGER("Can't Write SD Card!!\n");
|
||||
}
|
||||
PlaySound(SOUND_ANNOTATION);
|
||||
COMMON_LOGGER("Can't Write SD Card!!\n");
|
||||
}
|
||||
|
||||
// SDカードにリージョンデータがあるか?
|
||||
@ -313,26 +302,36 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
|
||||
}
|
||||
else
|
||||
{
|
||||
COMMON_LOGGER("Initialize Console\n");
|
||||
|
||||
// SDカードのIVSと本体のIVSは異なるか?
|
||||
if (EqualsIVSFileandIVS())
|
||||
if (!ExistsIVSFile())
|
||||
{
|
||||
// 同一本体に書き戻そうとしたファイルを作る
|
||||
COMMON_LOGGER("Restore to the same console. Initialize.\n");
|
||||
CreateTryRestoreSameConsoleFile();
|
||||
// 移行不能なのでFAIL
|
||||
COMMON_LOGGER("Can't Read IVS in SD Card!!\n");
|
||||
error = true;
|
||||
s_RestoreState = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 本体初期化完了ファイルを作る
|
||||
CreateConsoleInitializedFile();
|
||||
COMMON_LOGGER("Initialize Console\n");
|
||||
|
||||
// SDカードのIVSと本体のIVSは異なるか?
|
||||
if (EqualsIVSFileandIVS())
|
||||
{
|
||||
// 同一本体に書き戻そうとしたファイルを作る
|
||||
COMMON_LOGGER("Restore to the same console. Initialize.\n");
|
||||
CreateTryRestoreSameConsoleFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 本体初期化完了ファイルを作る
|
||||
CreateConsoleInitializedFile();
|
||||
|
||||
}
|
||||
|
||||
// ファイルシステムの初期化を行う
|
||||
InitializeFileSystem();
|
||||
error = true;
|
||||
s_RestoreState = REBOOTING;
|
||||
}
|
||||
|
||||
// ファイルシステムの初期化を行う
|
||||
InitializeFileSystem();
|
||||
error = true;
|
||||
s_RestoreState = REBOOTING;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user