diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp index a54b575..c54d4da 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "Controller.h" #include "FileChecker.h" @@ -96,6 +97,8 @@ bool s_ReadVersionDone = false; nn::Result s_ReadVersionResult = nn::ResultSuccess(); // SDに書き込みできない警告サウンドを鳴らしたかどうか bool s_SdWriteProetctAnnotation = false; +// WiFiがOFFである警告サウンドを鳴らしたかどうか +bool s_WifiStatusOffAnnotation = false; // ネットワークアップデートを開始したかどうか bool s_ExecuteFgNup = false; @@ -374,8 +377,21 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, { if (validApSetting) { - // 削除処理を行う - needsErase = true; + if(nn::nwm::CTR::IsWifiOn()) + { + // 削除処理を行う + needsErase = true; + } + else + { + if(!s_WifiStatusOffAnnotation) + { + s_WifiStatusOffAnnotation = true; + PlaySound(SOUND_ANNOTATION); + } + operationMessage.push_back(::std::string("Wireless is Off\n")); + error = true; + } } } } @@ -383,8 +399,22 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, { if (validApSetting) { - // ネットワークアップデートを行う - needsUpdate = true; + if(nn::nwm::CTR::IsWifiOn()) + { + // ネットワークアップデートを行う + needsUpdate = true; + } + else + { + if (!s_WifiStatusOffAnnotation) + { + s_WifiStatusOffAnnotation = true; + PlaySound(SOUND_ANNOTATION); + } + + operationMessage.push_back(::std::string("Wireless is Off\n")); + error = true; + } } } @@ -929,6 +959,7 @@ void InitializeState() s_ReadVersionDone = false; s_SdWriteProetctAnnotation = false; s_ReadVersionResult = nn::ResultSuccess(); + s_WifiStatusOffAnnotation = false; } u32 GetProgress()