From 87daa2c7153c21a0192a23c7dae7771ed573d921 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 8 Jun 2016 15:28:27 +0100 Subject: [PATCH] Improved feedback from scenery download. --- src/Viewer/splash.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; -- 2.39.5