diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp index 970c7c5..12bb079 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp @@ -264,7 +264,7 @@ void CheckDownloadIvs(::std::vector& message, bool& goNextStep) // IVS取得確認ファイルがあるか? if (common::ExistsDownloadIvsCheckedFile()) { - s_RestoreState = CONNECT_ONLY; + CheckWriteFinished(message, goNextStep); } else { @@ -349,7 +349,7 @@ void CheckConsoleInitialized(::std::vector& message, bool& goNextSt // 本体初期化完了ファイルがあるか? if (common::ExistsConsoleInitializedFile()) { - CheckExistsSerialNumber(message, goNextStep); + CheckRegioinSd(message, goNextStep); } else { @@ -369,9 +369,7 @@ void CheckExistsSerialNumber(::std::vector& message, bool& goNextSt nn::Result result = ReadSerialNumber(serial); if (result.IsSuccess()) { - ::std::string serialStr(reinterpret_cast (serial)); - message.push_back(::std::string("Serial Number in SD : ") + serialStr); - CheckRegioinSd(message, goNextStep); + s_RestoreState = WAIT_START_IMPORT; } else { @@ -382,7 +380,6 @@ void CheckExistsSerialNumber(::std::vector& message, bool& goNextSt { COMMON_LOGGER("Can't Read Serial Number in SD Card!!\n"); s_RestoreState = SERIAL_IS_NOT_IN_SD; - CheckRegioinSd(message, goNextStep); } } @@ -421,7 +418,7 @@ void CheckRegioinSd(::std::vector& message, bool& goNextStep) } else { - s_RestoreState = WAIT_START_IMPORT; + CheckExistsSerialNumber(message, goNextStep); } } @@ -564,6 +561,18 @@ void ControlState(::std::vector& operationMessage, bool& nextStep) case WAIT_START_IMPORT: { + u8 serial[nn::cfg::CTR::CFG_SECURE_INFO_SERIAL_NO_LEN]; + result = ReadSerialNumber(serial); + if (result.IsSuccess()) + { + ::std::string serialStr(reinterpret_cast (serial)); + operationMessage.push_back(::std::string("Serial Number in SD : ") + serialStr); + } + else + { + s_RestoreState = FAIL; + } + operationMessage.push_back(::std::string("Push A or START Button")); operationMessage.push_back(::std::string("Import Data Mode")); if (!s_PlayedStartCursor) @@ -943,7 +952,7 @@ void ControlState(::std::vector& operationMessage, bool& nextStep) { COMMON_LOGGER("Shop Connect Finished.\n"); - CheckWriteFinished(operationMessage, nextStep); + s_RestoreState = DOWNLOAD_TWL; } else { @@ -1148,7 +1157,7 @@ void ControlState(::std::vector& operationMessage, bool& nextStep) init = false; } - s_RestoreState = DOWNLOAD_TWL; + s_RestoreState = CONNECT_ONLY; } case DOWNLOAD_TWL: diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h index 9af534f..db6901c 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.h @@ -51,6 +51,8 @@ const wchar_t* const CHECK_FILENAME_TABLE[] = common::INITIALIZED_CHECK_PATHNAME, common::WRITE_FINISHED_CHECK_PATHNAME, common::RTC_SYNC_CHECK_PATHNAME, + common::DOWNLOAD_IVS_CHECK_PATHNAME, + common::DELETE_ACCOUNT_CHECK_PATHNAME }; void DeleteAllCheckFiles(); diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Shop.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Shop.cpp index cd29312..bf1c1cf 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Shop.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Shop.cpp @@ -296,7 +296,7 @@ void ShopOperationSingleThreadFunc(ShopOperation op) void StartShopOperationSingle(ShopOperation op) { - NN_LOG("Start ShopOperationSingle"); + NN_LOG("Start ShopOperationSingle\n"); s_Result = nn::ResultSuccess(); s_UnregisterThread.Start(ShopOperationSingleThreadFunc, op, s_UnregisterThreadStack); }