Fix download rate on splash screen.
This commit is contained in:
parent
baebc9b64c
commit
6845ff56f3
1 changed files with 8 additions and 8 deletions
|
@ -403,10 +403,6 @@ void fgSplashProgress( const char *identifier ) {
|
||||||
"sys", "<incomplete language resource>");
|
"sys", "<incomplete language resource>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(fgGetString("/sim/startup/splash-progress-text"), text)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp(identifier,"downloading-scenery")) {
|
if (!strcmp(identifier,"downloading-scenery")) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
unsigned int kbytesPerSec = fgGetInt("/sim/terrasync/transfer-rate-bytes-sec") / 1024;
|
unsigned int kbytesPerSec = fgGetInt("/sim/terrasync/transfer-rate-bytes-sec") / 1024;
|
||||||
|
@ -415,9 +411,13 @@ void fgSplashProgress( const char *identifier ) {
|
||||||
oss << " - " << kbytesPerSec << " KBytes/sec";
|
oss << " - " << kbytesPerSec << " KBytes/sec";
|
||||||
}
|
}
|
||||||
fgSetString("/sim/startup/splash-progress-text", oss.str());
|
fgSetString("/sim/startup/splash-progress-text", oss.str());
|
||||||
} else {
|
return;
|
||||||
SG_LOG( SG_VIEW, SG_INFO, "Splash screen progress " << identifier );
|
|
||||||
fgSetString("/sim/startup/splash-progress-text", text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue