From 8dcb999097639eae9d783b56cea258697e035a46 Mon Sep 17 00:00:00 2001 From: N2614 Date: Tue, 19 Apr 2011 08:31:11 +0000 Subject: [PATCH] =?UTF-8?q?ZeroNUP=E9=99=90=E5=AE=9A=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=82=92=E5=89=8A=E9=99=A4=E3=80=82=E5=BF=85=E3=81=9A?= =?UTF-8?q?NUP=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=80=82=20enu?= =?UTF-8?q?m=E3=82=92=E9=81=A9=E5=88=87=E3=81=AA=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@206 385bec56-5757-e545-9c3a-d8741f4650f1 --- .../ConsoleRestore/Controller.cpp | 65 ++----------------- 1 file changed, 5 insertions(+), 60 deletions(-) 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; }