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 2021-05-01 10:40:34 -07:00
parent 3379f33882
commit 2f08fb6583
7 changed files with 39 additions and 7 deletions

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_; }