Store: Show a rough speed indicator.

Some of the homebrew are a bit larger, it's nice to see a speed and not
just the progress bar.
This commit is contained in:
Unknown W. Brackets committed 2021-05-01 11:20:05 -07:00
1 parent 3379f33882
commit 2f08fb6583
7 files changed
+39 -7

No files matched your search

+2
View File
@@ -48,6 +48,7 @@ struct RequestProgress {
explicit RequestProgress(bool *c) : cancelled(c) {}
float progress = 0.0f;
float kBps = 0.0f;
bool *cancelled = nullptr;
};
@@ -98,6 +99,7 @@ public:
// Returns 1.0 when done. That one value can be compared exactly - or just use Done().
float Progress() const { return progress_.progress; }
float SpeedKBps() const { return progress_.kBps; }
bool Done() const { return completed_; }
bool Failed() const { return failed_; }