1
0
Fork 0

src/Viewer/splash.cxx: show when download speed is zero.

This commit is contained in:
Julian Smith 2020-09-13 18:07:51 +01:00
parent aa1e0e1d1d
commit 710a11eeda

View file

@ -694,13 +694,11 @@ void fgSplashProgress( const char *identifier, unsigned int percent )
oss << " " << kbytesPending << "KB";
}
}
if (kbytesPerSec > 0) {
if (kbytesPerSec > 100) {
double mbytesPerSec = kbytesPerSec / 1024.0;
oss << " - " << std::fixed << std::setprecision(1) << mbytesPerSec << "MB/sec";
} else {
oss << " - " << kbytesPerSec << " KB/sec";
}
if (kbytesPerSec > 100) {
double mbytesPerSec = kbytesPerSec / 1024.0;
oss << " - " << std::fixed << std::setprecision(1) << mbytesPerSec << "MB/sec";
} else {
oss << " - " << kbytesPerSec << " KB/sec";
}
fgSetString("/sim/startup/splash-progress-spinner", oss.str());
}