mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
ファイル転送量表示の初期化をまとめる
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@45 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
92c972d9e0
commit
eaa3853461
@ -308,8 +308,7 @@ void WriteTwlData(enum common::TWL_PATH_INDEX path)
|
||||
NN_LOG("File Number = %d\n", fileNum);
|
||||
NN_LOG("File Size = %d\n", fileSize);
|
||||
// 進捗表示用
|
||||
common::SetTotalSize(fileSize);
|
||||
common::ClearFinishedSize();
|
||||
common::InitializeTransferProgress(fileSize);
|
||||
|
||||
void* buf = common::HeapManager::GetHeap()->Allocate(bufSize);
|
||||
if (buf != NULL)
|
||||
@ -428,8 +427,7 @@ nn::Result WriteSaveData()
|
||||
NN_LOG("File Number = %d\n", fileNum);
|
||||
NN_LOG("File Size = %d\n", fileSize);
|
||||
// 進捗表示用
|
||||
common::SetTotalSize(fileSize);
|
||||
common::ClearFinishedSize();
|
||||
common::InitializeTransferProgress(fileSize);
|
||||
|
||||
::std::mbstowcs(s_RootName, s_SysSaveRoot.c_str(), s_SysSaveRoot.size() + 1);
|
||||
|
||||
|
||||
@ -590,8 +590,7 @@ void ImportSaveData()
|
||||
common::SdMountManager::Unmount();
|
||||
|
||||
// ファイルサイズ設定
|
||||
common::SetTotalSize(fileSize);
|
||||
common::ClearFinishedSize();
|
||||
common::InitializeTransferProgress(fileSize);
|
||||
|
||||
NN_LOG("File Number = %d\n", fileNum);
|
||||
NN_LOG("File Size = %d\n", fileSize);
|
||||
@ -1129,8 +1128,7 @@ void ImportTwlData(enum common::TWL_PATH_INDEX path)
|
||||
common::CalculateFileNum(::std::wstring(common::SDMC_ROOT_DIRECTORY_PATH) + ::std::wstring(
|
||||
common::SD_TWL_ROOTNAME_TABLE[path]), fileNum, fileSize);
|
||||
// ファイルサイズ設定
|
||||
common::SetTotalSize(fileSize);
|
||||
common::ClearFinishedSize();
|
||||
common::InitializeTransferProgress(fileSize);
|
||||
|
||||
NN_LOG("File Number = %d\n", fileNum);
|
||||
NN_LOG("File Size = %d\n", fileSize);
|
||||
|
||||
@ -240,13 +240,9 @@ u32 GetProgress()
|
||||
return s_Progress;
|
||||
}
|
||||
|
||||
void SetTotalSize(u64 size)
|
||||
{
|
||||
s_TotalFileSize = size;
|
||||
}
|
||||
|
||||
void ClearFinishedSize()
|
||||
void InitializeTransferProgress(u64 totalSize)
|
||||
{
|
||||
s_TotalFileSize = totalSize;
|
||||
s_FinishedFileSize = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -26,8 +26,7 @@ namespace common
|
||||
nn::Result CalculateFileNum(std::wstring currentDirectory, u32& fileNum, u32& fileSize);
|
||||
bool CopyDirectory(const wchar_t * from_path, const wchar_t * to_path, void* buf, const size_t bufSize);
|
||||
u32 GetProgress();
|
||||
void SetTotalSize(u64 size);
|
||||
void ClearFinishedSize();
|
||||
void InitializeTransferProgress(u64 totalSize);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user