Progress bar: Fix the indeterminate state

This commit is contained in:
Henrik Rydgård
2023-06-21 00:15:23 +02:00
parent d2c3a7c978
commit ff75eced70
3 changed files with 31 additions and 13 deletions

View File

@@ -95,8 +95,8 @@ void OnScreenDisplay::SetProgressBar(std::string id, std::string &&message, int
bool found = false;
for (auto &bar : bars_) {
if (bar.id == id) {
_dbg_assert_(minValue == bar.minValue);
_dbg_assert_(maxValue == bar.maxValue);
bar.minValue = minValue;
bar.maxValue = maxValue;
bar.progress = progress;
bar.message = message;
bar.endTime = now + 60.0; // Nudge the progress bar to keep it shown.