From: James Turner Date: Wed, 8 Jun 2016 14:28:27 +0000 (+0100) Subject: Improved feedback from scenery download. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=87daa2c7153c21a0192a23c7dae7771ed573d921;p=flightgear.git Improved feedback from scenery download. --- diff --git a/src/Viewer/splash.cxx b/src/Viewer/splash.cxx index bfb4d3625..a51b4f607 100644 --- a/src/Viewer/splash.cxx +++ b/src/Viewer/splash.cxx @@ -424,9 +424,18 @@ void fgSplashProgress( const char *identifier, unsigned int percent ) { if (!strcmp(identifier,"downloading-scenery")) { std::ostringstream oss; unsigned int kbytesPerSec = fgGetInt("/sim/terrasync/transfer-rate-bytes-sec") / 1024; + unsigned int kbytesPending = fgGetInt("/sim/terrasync/pending-kbytes"); oss << text; + if (kbytesPending > 0) { + if (kbytesPending > 1024) { + int mBytesPending = kbytesPending >> 10; + oss << " " << mBytesPending << "Mb"; + } else { + oss << " " << kbytesPending << "Kb"; + } + } if (kbytesPerSec > 0) { - oss << " - " << kbytesPerSec << " KBytes/sec"; + oss << " - " << kbytesPerSec << " Kb/sec"; } fgSetString("/sim/startup/splash-progress-text", oss.str()); return;