mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 09:35:39 +00:00
Added a startup log message about the number of parsed and loaded systems.
This commit is contained in:
parent
8c4098edaa
commit
bddaf5f7e9
|
@ -464,7 +464,7 @@ bool SystemData::loadConfig()
|
||||||
|
|
||||||
const bool splashScreen {Settings::getInstance()->getBool("SplashScreen")};
|
const bool splashScreen {Settings::getInstance()->getBool("SplashScreen")};
|
||||||
float systemCount {0.0f};
|
float systemCount {0.0f};
|
||||||
float loadedSystems {0.0f};
|
float parsedSystems {0.0f};
|
||||||
|
|
||||||
// This is only done to get the total system count, for calculating the progress bar position.
|
// This is only done to get the total system count, for calculating the progress bar position.
|
||||||
for (auto& configPath : configPaths) {
|
for (auto& configPath : configPaths) {
|
||||||
|
@ -555,12 +555,12 @@ bool SystemData::loadConfig()
|
||||||
const uint64_t curTime {SDL_GetTicks64()};
|
const uint64_t curTime {SDL_GetTicks64()};
|
||||||
accumulator += curTime - lastTime;
|
accumulator += curTime - lastTime;
|
||||||
lastTime = curTime;
|
lastTime = curTime;
|
||||||
++loadedSystems;
|
++parsedSystems;
|
||||||
// This prevents Renderer::swapBuffers() from being called excessively which
|
// This prevents Renderer::swapBuffers() from being called excessively which
|
||||||
// could lead to significantly longer application startup times.
|
// could lead to significantly longer application startup times.
|
||||||
if (accumulator > 15) {
|
if (accumulator > 15) {
|
||||||
accumulator = 0;
|
accumulator = 0;
|
||||||
const float progress {glm::mix(0.0f, 0.5f, loadedSystems / systemCount)};
|
const float progress {glm::mix(0.0f, 0.5f, parsedSystems / systemCount)};
|
||||||
Window::getInstance()->renderSplashScreen(Window::SplashScreenState::SCANNING,
|
Window::getInstance()->renderSplashScreen(Window::SplashScreenState::SCANNING,
|
||||||
progress);
|
progress);
|
||||||
}
|
}
|
||||||
|
@ -771,6 +771,11 @@ bool SystemData::loadConfig()
|
||||||
if (splashScreen)
|
if (splashScreen)
|
||||||
Window::getInstance()->renderSplashScreen(Window::SplashScreenState::SCANNING, 0.5f);
|
Window::getInstance()->renderSplashScreen(Window::SplashScreenState::SCANNING, 0.5f);
|
||||||
|
|
||||||
|
LOG(LogInfo) << "Parsed configuration for " << systemCount << " system"
|
||||||
|
<< (systemCount == 1 ? ", loaded " : "s, loaded ") << sSystemVector.size()
|
||||||
|
<< " system" << (sSystemVector.size() == 1 ? "" : "s")
|
||||||
|
<< " (collections not included)";
|
||||||
|
|
||||||
// Sort systems by sortName, which will normally be the same as the full name.
|
// Sort systems by sortName, which will normally be the same as the full name.
|
||||||
std::sort(std::begin(sSystemVector), std::end(sSystemVector), [](SystemData* a, SystemData* b) {
|
std::sort(std::begin(sSystemVector), std::end(sSystemVector), [](SystemData* a, SystemData* b) {
|
||||||
return Utils::String::toUpper(a->getSortName()) < Utils::String::toUpper(b->getSortName());
|
return Utils::String::toUpper(a->getSortName()) < Utils::String::toUpper(b->getSortName());
|
||||||
|
|
Loading…
Reference in a new issue