1
0
Fork 0

Prettier terrasync progress on splash screen.

This commit is contained in:
James Turner 2016-11-07 15:29:17 +01:00
parent 4d8c04bc58
commit 793c78512e

View file

@ -435,7 +435,12 @@ void fgSplashProgress( const char *identifier, unsigned int percent ) {
}
}
if (kbytesPerSec > 0) {
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-text", oss.str());
return;