mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
FAILしない限り繰り返し吸い出すように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@362 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
497edc847f
commit
9c6fde0460
@ -13,6 +13,8 @@
|
||||
$Rev$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <nn/ns.h>
|
||||
|
||||
#include "Controller.h"
|
||||
#include "FileChecker.h"
|
||||
#include "Exporter.h"
|
||||
@ -37,7 +39,8 @@ typedef enum BackupState
|
||||
DELETE_NIM, // nimのシステムセーブデータ削除
|
||||
DONE, // 吸出し完了
|
||||
FINISHED, // SDカード抜き完了
|
||||
FAIL // 失敗
|
||||
FAIL, // 失敗
|
||||
REBOOTING // 再起動
|
||||
} BackupState;
|
||||
|
||||
|
||||
@ -143,7 +146,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
}
|
||||
}
|
||||
|
||||
if (nextStep && !error)
|
||||
if (!error)
|
||||
{
|
||||
COMMON_LOGGER("Start Export Data\n");
|
||||
|
||||
@ -312,6 +315,8 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
common::PlaySound(common::SOUND_CURSOR);
|
||||
s_PlayedSdPullOutCursor = true;
|
||||
}
|
||||
|
||||
s_BackupState = REBOOTING;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -339,6 +344,33 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
}
|
||||
break;
|
||||
|
||||
case REBOOTING:
|
||||
{
|
||||
static bool init = true;
|
||||
|
||||
if (init)
|
||||
{
|
||||
// ErrDispから引用
|
||||
nn::Result result = nn::ns::CTR::InitializeForShell();
|
||||
if (result.IsSuccess())
|
||||
{
|
||||
COMMON_LOGGER("System Reboot.\n");
|
||||
|
||||
nn::ns::CTR::HardwareResetAsync(nn::CTR::MEMORY_ARRANGE_NORMAL);
|
||||
while (!nn::applet::IsExpectedToCloseApplication())
|
||||
{
|
||||
nn::os::Thread::Sleep(nn::fnd::TimeSpan::FromMilliSeconds(5));
|
||||
}
|
||||
|
||||
nn::ns::CTR::FinalizeForShell();
|
||||
|
||||
// INFO: リブートは非同期のため処理は継続
|
||||
}
|
||||
init = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -61,6 +61,7 @@ LIBS += libnn_cfg \
|
||||
libnn_friends \
|
||||
libnn_nim \
|
||||
libnn_am \
|
||||
libnn_ns \
|
||||
|
||||
INSTALL_SDK_TOOL = true
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user