1
0
Fork 0

Fixed splash download statistics to use 'B' for bytes rather than 'b'.

'b' usually means bits.
This commit is contained in:
Julian Smith 2020-06-08 18:12:36 +01:00
parent a7d8d9c2ab
commit 43130aa581

View file

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