diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp index 1304542..1c30417 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp @@ -71,8 +71,6 @@ bool s_ReadSettingDone = false; bool s_ReadSettingSuccess = false; // NUP専用モードかどうか bool s_NupOnlyMode = false; -// NUP禁止モードかどうか -bool s_NeverNup = false; // APSettingの書式が無い警告サウンドを鳴らしたかどうか bool s_ExistAPSettingAnnotation = false; @@ -121,7 +119,7 @@ bool CheckAndReadAPSetting(::std::vector& operationMessage) if (!s_ReadSettingDone) { s_ReadSettingDone = true; - s_ReadSettingSuccess = ReadSetting(&s_NupOnlyMode, &s_NeverNup); + s_ReadSettingSuccess = ReadSetting(&s_NupOnlyMode); } if(s_NupOnlyMode) @@ -194,12 +192,10 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, // SDカードが挿入されているか? if (nn::fs::IsSdmcInserted()) { - validApSetting = CheckAndReadAPSetting(operationMessage); - - // NUP禁止モードか、SDカードにアップデート完了ファイルがあるか? - if (s_NeverNup || ExistsUpdateCheckedFile()) + // SDカードにアップデート完了ファイルがあるか? + if (ExistsUpdateCheckedFile()) { - // NUP専用モードなら終了処理に移る + validApSetting = CheckAndReadAPSetting(operationMessage); if (s_NupOnlyMode) { s_RestoreState = NUP_ONLY_WAIT_SD_EJECT; @@ -296,7 +292,7 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, } else { - if (validApSetting) + if (CheckAndReadAPSetting(operationMessage)) { // ネットワークアップデートを行う needsUpdate = true; @@ -708,14 +704,6 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, // 書き込み失敗 case FAIL: { - static bool init = true; - if(init) - { - // 状態初期化 - DeleteAllCheckFiles(); - init = false; - } - operationMessage.push_back(::std::string("Failed.")); if (!s_PlayedFailSound) { diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp index b2f370c..de42f4a 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp @@ -869,7 +869,7 @@ bool UpdateNetworkSetting(nn::ac::NetworkSetting& networkSetting) return retval; } -bool ReadSetting(bool* nupOnly, bool* neverNup) +bool ReadSetting(bool* nupOnly) { nn::Result result; bool retval = true; @@ -1170,25 +1170,6 @@ bool ReadSetting(bool* nupOnly, bool* neverNup) } - { - NN_NULL_ASSERT(neverNup); - if (configfileLoader.ReadAsChar(L"NEVER_NUP") != NULL) - { - s32 num = configfileLoader.ReadAsInteger(L"NEVER_NUP"); - if (num == 1) - { - *neverNup = true; - COMMON_LOGGER("NEVER_NUP Mode.\n"); - } - else - { - - } - } - } - - // NEVER_NUPがNUP専用モードよりも優先 - if(!(*neverNup)) { NN_NULL_ASSERT(nupOnly); if (configfileLoader.ReadAsChar(L"NUP_ONLY") != NULL) @@ -1202,7 +1183,6 @@ bool ReadSetting(bool* nupOnly, bool* neverNup) } } - configfileLoader.Finalize(); // 書き込み完了しなければfalse diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h index d01f6de..950c429 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h @@ -60,7 +60,7 @@ struct TimeZone NN_PADDING3; }; -bool ReadSetting(bool* nupOnly, bool* neverNup); +bool ReadSetting(bool* nupOnly); char* GetNtpServerName(); TimeZone GetTimeZone();