From 6845ff56f31f7152662bdda3b3fac6f505670cb1 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 21 Oct 2013 23:04:10 +0100 Subject: [PATCH] Fix download rate on splash screen. --- src/Viewer/splash.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Viewer/splash.cxx b/src/Viewer/splash.cxx index 8b881d438..5452aac64 100644 --- a/src/Viewer/splash.cxx +++ b/src/Viewer/splash.cxx @@ -403,10 +403,6 @@ void fgSplashProgress( const char *identifier ) { "sys", ""); } - if (!strcmp(fgGetString("/sim/startup/splash-progress-text"), text)) { - return; - } - if (!strcmp(identifier,"downloading-scenery")) { std::ostringstream oss; unsigned int kbytesPerSec = fgGetInt("/sim/terrasync/transfer-rate-bytes-sec") / 1024; @@ -415,9 +411,13 @@ void fgSplashProgress( const char *identifier ) { oss << " - " << kbytesPerSec << " KBytes/sec"; } fgSetString("/sim/startup/splash-progress-text", oss.str()); - } else { - SG_LOG( SG_VIEW, SG_INFO, "Splash screen progress " << identifier ); - fgSetString("/sim/startup/splash-progress-text", text); + return; } - + + if (!strcmp(fgGetString("/sim/startup/splash-progress-text"), text)) { + return; + } + + SG_LOG( SG_VIEW, SG_INFO, "Splash screen progress " << identifier ); + fgSetString("/sim/startup/splash-progress-text", text); }