mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
タイトルダウンロードのリトライ前にスレッドをFinalizeするように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@309 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
7540f46573
commit
a72bdc5f70
@ -1342,8 +1342,9 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
PutAliveMessage(operationMessage, "Download Twl Title");
|
||||
}
|
||||
|
||||
if (DownloadTitleFinished())
|
||||
if (IsDownloadTitleFinished())
|
||||
{
|
||||
FinalizeTitleDownload();
|
||||
if (DownloadTitleSucceeded())
|
||||
{
|
||||
s_IsSyncClock = true;
|
||||
|
||||
@ -127,11 +127,17 @@ void StartTitleDownload()
|
||||
s_TitleDownloaderThread.Start(TitleDownloaderThreadFunc, s_TitleDownloaderThreadStack);
|
||||
}
|
||||
|
||||
bool DownloadTitleFinished()
|
||||
bool IsDownloadTitleFinished()
|
||||
{
|
||||
return s_TitleDownloaderThread.IsValid() && !s_TitleDownloaderThread.IsAlive();
|
||||
}
|
||||
|
||||
void FinalizeTitleDownload()
|
||||
{
|
||||
s_TitleDownloaderThread.Join();
|
||||
s_TitleDownloaderThread.Finalize();
|
||||
}
|
||||
|
||||
bool DownloadTitleSucceeded()
|
||||
{
|
||||
return TitleDownloader::m_Result.IsSuccess() && GetShopOperationSingleResult().IsSuccess();
|
||||
|
||||
@ -24,12 +24,15 @@ namespace ConsoleRestore
|
||||
// 新たにスレッドを立て、タイトルのダウンロードを開始する
|
||||
void StartTitleDownload();
|
||||
|
||||
// タイトルのダウンロードスレッドを終了する
|
||||
bool DownloadTitleFinished();
|
||||
// タイトルのダウンロードスレッドが終了したかどうか
|
||||
bool IsDownloadTitleFinished();
|
||||
|
||||
// タイトルのダウンロードスレッドが成功したかどうか
|
||||
bool DownloadTitleSucceeded();
|
||||
|
||||
// タイトルのダウンロードスレッドを終了する
|
||||
void FinalizeTitleDownload();
|
||||
|
||||
// タイトルダウンロードの進捗を取得する
|
||||
u32 GetTitleDownloadProgress();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user