ネットワークアップデート完了後の再起動前にボタン操作を待つように

操作の前にカーソル音を鳴らすように

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@42 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
N2614 2011-02-10 00:58:05 +00:00
parent cf30075a41
commit 45fee26050
2 changed files with 65 additions and 6 deletions

View File

@ -45,6 +45,8 @@ typedef enum BackupState
bool s_ExistAPSettingAnnotation = false;
BackupState s_BackupState = STARTUP;
bool s_PlayedStartCursor = false;
bool s_PlayedSdPullOutCursor = false;
bool s_PlayedFinishedSound = false;
bool s_PlayedFailSound = false;
@ -130,13 +132,17 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
if(!error)
{
operationMessage.push_back(::std::string("Push A or START Button"));
if(!s_PlayedStartCursor)
{
common::PlaySound(common::SOUND_CURSOR);
s_PlayedStartCursor = true;
}
}
if (nextStep && !error)
{
COMMON_LOGGER("Start Export Data\n");
s_BackupState = EXPORT_TWL_SOUND;
common::PlaySound(common::SOUND_CURSOR);
}
}
break;
@ -227,6 +233,11 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
case DONE:
{
operationMessage.push_back(::std::string("Backup Done. Pull Out SD Card."));
if(!s_PlayedSdPullOutCursor)
{
common::PlaySound(common::SOUND_CURSOR);
s_PlayedSdPullOutCursor = true;
}
}
break;
@ -291,6 +302,8 @@ void InitializeState()
s_PlayedFailSound = false;
s_PlayedFinishedSound = false;
s_ExistAPSettingAnnotation = false;
s_PlayedStartCursor = false;
s_PlayedSdPullOutCursor = false;
}
} // namespace ConsoleBackup

View File

@ -40,6 +40,7 @@ typedef enum RestoreState
SERIAL_IS_NOT_IN_SD, // シリアルナンバーファイルがSDカードにないことを表示
SERIAL_IN_SD, // シリアルナンバーの情報を表示
UPDATE_IN_PROGRESS, // アップデート中
UPDATE_DONE, // アップデート完了
RESTORE_TWL_SOUND, // TWLサウンドの書き込み中
RESTORE_TWL_PHOTO, // TWL写真の書き込み中
RESTORE_IN_PROGRESS, // 書き込み中
@ -71,6 +72,12 @@ bool s_APSettingAnnotation = false;
bool s_SerialNumberAnnotation = false;
// 失敗サウンドを鳴らしたかどうか
bool s_PlayedFailSound = false;
// 操作開始サウンドを鳴らしたかどうか
bool s_PlayedStartCursor = false;
// リブート開始前サウンドを鳴らしたかどうか
bool s_PlayedRebootCursor = false;
// SD抜き出し前サウンドを鳴らしたかどうか
bool s_PlayedSdPullOutCursor = false;
// ネットワークアップデートを開始したかどうか
bool s_ExecuteFgNup = false;
@ -298,6 +305,12 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
{
operationMessage.push_back(::std::string("Import Data Mode"));
}
if(!s_PlayedStartCursor)
{
PlaySound(SOUND_CURSOR);
s_PlayedStartCursor = true;
}
}
if (nextStep && !error)
@ -311,20 +324,18 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
ExecSyncMcuRtc();
s_RestoreState = UPDATE_IN_PROGRESS;
PlaySound(SOUND_CURSOR);
}
else if(needsErase)
{
COMMON_LOGGER("Erase Trash\n");
s_RestoreState = ERASE;
PlaySound(SOUND_CURSOR);
}
else
{
COMMON_LOGGER("Start Import Data\n");
s_RestoreState = RESTORE_TWL_SOUND;
PlaySound(SOUND_CURSOR);
}
}
}
break;
@ -394,8 +405,8 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
// アップデート完了ファイルを作成
CreateUpdateFinishedFile();
// リブートする
s_RestoreState = REBOOTING;
s_RestoreState = UPDATE_DONE;
}
else
{
@ -418,6 +429,26 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
}
break;
// アップデート完了
case UPDATE_DONE:
{
operationMessage.push_back(::std::string("Network Update Done."));
operationMessage.push_back(::std::string("Press A or START Button to Reboot"));
if(!s_PlayedRebootCursor)
{
PlaySound(SOUND_CURSOR);
s_PlayedRebootCursor = true;
}
if (nextStep)
{
s_RestoreState = REBOOTING;
}
}
break;
// TWLサウンド領域の書き込み中
case RESTORE_TWL_SOUND:
{
@ -538,6 +569,12 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
operationMessage.push_back(::std::string("Restore Done."));
operationMessage.push_back(::std::string("Press A or START Button to Reboot"));
if(!s_PlayedRebootCursor)
{
PlaySound(SOUND_CURSOR);
s_PlayedRebootCursor = true;
}
if (nextStep)
{
s_RestoreState = REBOOTING;
@ -609,6 +646,12 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
operationMessage.push_back(::std::string("ALL Done. Pull Out SD Card."));
// SDカード抜けのみで次の状態に遷移する
if (!s_PlayedSdPullOutCursor)
{
common::PlaySound(common::SOUND_CURSOR);
s_PlayedSdPullOutCursor = true;
}
}
break;
@ -682,6 +725,9 @@ void InitializeState()
s_PlayedFailSound = false;
s_ExecuteFgNup = false;
s_FgNupRetryCount = 0;
s_PlayedStartCursor = false;
s_PlayedRebootCursor = false;
s_PlayedSdPullOutCursor = false;
}
u32 GetProgress()