src/Viewer/splash.cxx: show when download speed is zero.
This commit is contained in:
parent
aa1e0e1d1d
commit
710a11eeda
1 changed files with 5 additions and 7 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue