RTC同期部分の移動

システム時計の無効化は移行元のptmのセーブデータが使われてから行う必要がある

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@16 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
N2614 2011-02-04 07:02:54 +00:00
parent e0ad9123da
commit 52cb279122

View File

@ -144,7 +144,6 @@ void ExecSyncMcuRtc()
{
ImportMcuRtc();
// 時計を無効化する
nn::ptm::CTR::InvalidateSystemTime();
CreateRtcSyncFinishedFile();
}
}
@ -298,6 +297,11 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
if (needsUpdate)
{
COMMON_LOGGER("Start Network Update\n");
// RTC同期を行う
// でいるだけ早いタイミングで同期したいがフラグ用ファイルの存在確認に
// 失敗するのでここで同期する
ExecSyncMcuRtc();
s_RestoreState = UPDATE_IN_PROGRESS;
common::PlaySound(common::SOUND_CURSOR);
}
@ -477,10 +481,6 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
if (nextStep)
{
// RTC同期を行う
// RTC書き込み後できるだけ早いタイミングで再起動したいのでここで同期
ExecSyncMcuRtc();
s_RestoreState = REBOOTING;
}
}
@ -501,6 +501,8 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
if(init)
{
COMMON_LOGGER("Adjust Time\n");
// ptmのセーブデータ移行後に時計を無効化する
nn::ptm::CTR::InvalidateSystemTime();
AdjustTime();
init = false;
}