From b9926341de48626e3f62be782a3175172f4caa57 Mon Sep 17 00:00:00 2001 From: N2614 Date: Wed, 20 Apr 2011 09:58:13 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=B7=E3=83=AA=E3=82=A2=E3=83=AB=E3=83=8A?= =?UTF-8?q?=E3=83=B3=E3=83=90=E3=83=BC=E5=AD=98=E5=9C=A8=E3=83=81=E3=82=A7?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=81=A8=E3=83=AA=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=81=AE=E9=A0=86?= =?UTF-8?q?=E7=95=AA=E5=85=A5=E3=82=8C=E6=9B=BF=E3=81=88=20=E6=96=B0?= =?UTF-8?q?=E3=81=9F=E3=81=AB=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F=E9=80=B2?= =?UTF-8?q?=E6=8D=97=E7=AE=A1=E7=90=86=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= 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@208 385bec56-5757-e545-9c3a-d8741f4650f1 --- .../ConsoleRestore/Controller.cpp | 27 ++++++++++++------- .../ConsoleRestore/Importer.h | 2 ++ .../ConsoleRestore/Shop.cpp | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) 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); }