diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp index 5321a5f..42d4f5f 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp @@ -56,7 +56,7 @@ typedef enum RestoreState RESTORE_DONE, // 書き込み完了 REBOOTING, // 再起動を行う ERASE, // 削除処理を行う - HISTORY_RECOVER, // プレイ履歴の書き戻しを行う + RESTORE_CAL, // cfgの一部をcal値で上書きする TIME_ADJUST, // 時計あわせを行う WAIT_SD_EJECT, // SDカードぬき待ち ALL_DONE, // すべて完了 @@ -90,12 +90,6 @@ bool s_PlayedStartCursor = false; bool s_PlayedRebootCursor = false; // SD抜き出し前サウンドを鳴らしたかどうか bool s_PlayedSdPullOutCursor = false; -// バージョンデータが無い警告サウンドを鳴らしたかどうか -bool s_ExistsVersionDataAnnotation = false; -// バージョンデータを読んだかどうか -bool s_ReadVersionDone = false; -// バージョンデータを読んだ結果 -nn::Result s_ReadVersionResult = nn::ResultSuccess(); // SDに書き込みできない警告サウンドを鳴らしたかどうか bool s_SdWriteProetctAnnotation = false; // WiFiがOFFである警告サウンドを鳴らしたかどうか @@ -155,32 +149,6 @@ bool CheckAndReadAPSetting(::std::vector& operationMessage) return s_ReadSettingSuccess; } -nn::Result CheckAndReadVersionData(::std::vector& operationMessage) -{ - using namespace common; - - if (!ExistsVersionData()) - { - if(!s_ExistsVersionDataAnnotation) - { - s_ExistsVersionDataAnnotation = true; - common::PlaySound(common::SOUND_ANNOTATION); - } - operationMessage.push_back(::std::string("Version Data does not exist!")); - return nn::Result(nn::Result::LEVEL_PERMANENT, nn::Result::SUMMARY_NOT_FOUND, nn::Result::MODULE_COMMON, - nn::Result::DESCRIPTION_NOT_FOUND); - } - - // バージョン情報ファイルを読み込む - if (!s_ReadVersionDone) - { - s_ReadVersionDone = true; - s_ReadVersionResult = ReadVersionData(); - } - - return s_ReadVersionResult; -} - void PutAliveMessage(::std::vector& operationMessage, const char* str) { std::string message = std::string(str); @@ -220,19 +188,6 @@ nn::Result ExecSyncMcuRtc() return result; } -// Zero NUP限定コード -bool NeedsNup() -{ - if(AlreadyExecutedNup() || s_NupOnlyMode) - { - return !common::ExistsUpdateCheckedFile(); - } - else - { - return false; - } -} - void ControlState(::std::vector& operationMessage, bool& nextStep, bool& continueRestore) { using namespace common; @@ -264,14 +219,6 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, break; } - result = CheckAndReadVersionData(operationMessage); - if(result.IsFailure()) - { - // バージョン情報の取得に失敗 - error = true; - s_RestoreState = FAIL; - } - validApSetting = CheckAndReadAPSetting(operationMessage); if (!validApSetting) { @@ -279,8 +226,8 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, } else { - // NUPが必要か? - if (!NeedsNup()) + // NUP済みかどうか + if (ExistsUpdateCheckedFile()) { if (s_NupOnlyMode) { @@ -780,12 +727,12 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, case ERASE: { Cleanup(); - s_RestoreState = HISTORY_RECOVER; + s_RestoreState = RESTORE_CAL; } break; // 削除処理 - case HISTORY_RECOVER: + case RESTORE_CAL: { static bool init = true; if (init) @@ -977,9 +924,7 @@ void InitializeState() s_PlayedRebootCursor = false; s_PlayedSdPullOutCursor = false; s_NupOnlyMode = false; - s_ReadVersionDone = false; s_SdWriteProetctAnnotation = false; - s_ReadVersionResult = nn::ResultSuccess(); s_WifiStatusOffAnnotation = false; }