mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
NUP実行前にSDカードに吸い出したシリアルナンバーを表示するように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@725 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
bee874d4c2
commit
842d745c5e
@ -237,6 +237,18 @@ void CheckExistsSerialNumber(common::HardwareStateManager& manager, common::Oper
|
||||
void CheckIvsinSd(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckRegioinSd(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
|
||||
bool DisplaySerialNumberinSD(common::OperationMessage& message)
|
||||
{
|
||||
u8 serial[nn::cfg::CTR::CFG_SECURE_INFO_SERIAL_NO_LEN];
|
||||
COMMON_LOGGER_RETURN_FALSE_IF_FAILED(
|
||||
ReadSerialNumber(serial));
|
||||
|
||||
::std::string serialStr(reinterpret_cast<char*>(serial));
|
||||
message.Add((::std::string("Serial Number in SD : ") + serialStr).c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// SDカード挿入チェック
|
||||
void CheckSdInserted(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
@ -873,6 +885,12 @@ void ControlState(common::HardwareStateManager& manager, common::OperationMessag
|
||||
|
||||
case WAIT_START_UPDATE:
|
||||
{
|
||||
//シリアルが存在しない場合がある
|
||||
if (common::ExistsSerialNumberFile() && !DisplaySerialNumberinSD(operationMessage))
|
||||
{
|
||||
s_RestoreState = FAIL;
|
||||
}
|
||||
|
||||
operationMessage.Add("Push A or START Button");
|
||||
operationMessage.Add("Network Update Mode");
|
||||
PlayCursorSound(WAIT_START_UPDATE);
|
||||
@ -891,14 +909,8 @@ void ControlState(common::HardwareStateManager& manager, common::OperationMessag
|
||||
|
||||
case WAIT_START_IMPORT:
|
||||
{
|
||||
u8 serial[nn::cfg::CTR::CFG_SECURE_INFO_SERIAL_NO_LEN];
|
||||
result = ReadSerialNumber(serial);
|
||||
if (result.IsSuccess())
|
||||
{
|
||||
::std::string serialStr(reinterpret_cast<char*> (serial));
|
||||
operationMessage.Add((::std::string("Serial Number in SD : ") + serialStr).c_str());
|
||||
}
|
||||
else
|
||||
// 必ずシリアルが存在するはず
|
||||
if(!DisplaySerialNumberinSD(operationMessage))
|
||||
{
|
||||
s_RestoreState = FAIL;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user