mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-10 14:14:21 +00:00
Update install page UI with tick rate
This commit is contained in:
parent
b3cb19760f
commit
e86db0f0b4
1 changed files with 8 additions and 8 deletions
|
@ -121,15 +121,15 @@ namespace tin::install::nsp
|
|||
|
||||
startTime = newTime;
|
||||
startSizeBuffered = newSizeBuffered;
|
||||
|
||||
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
||||
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
||||
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||
|
||||
printf("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
||||
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
||||
inst::ui::setInstBarPerc((double)downloadProgress);
|
||||
}
|
||||
|
||||
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
||||
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
||||
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||
|
||||
printf("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
||||
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
||||
inst::ui::setInstBarPerc((double)downloadProgress);
|
||||
//consoleUpdate(NULL);
|
||||
}
|
||||
inst::ui::setInstBarPerc(100);
|
||||
|
|
Loading…
Reference in a new issue