More progressbar improvements

This commit is contained in:
Henrik Rydgård committed 2023-07-18 15:52:14 +02:00
1 parent ecea3844b0
commit 370bb4c315
7 files changed
+52 -41

No files matched your search

+1 -1
View File
@@ -89,7 +89,7 @@ bool Buffer::ReadAllWithProgress(int fd, int knownSize, RequestProgress *progres
memcpy(p, &buf[0], retval);
total += retval;
if (progress) {
progress->Update((float)total / (float)knownSize);
progress->Update(total, knownSize, false);
progress->kBps = (float)(total / (time_now_d() - st)) / 1024.0f;
}
}