Removed debug output, applied work-around for minimap, and reduce

rendernig frequency.
This commit is contained in:
hiker 2018-12-11 11:39:32 +11:00
parent b2238a4c18
commit 92754e09fd

View File

@ -536,7 +536,7 @@ void MainLoop::run()
* responsive GUI, and allow GUI animations (like a progress bar) to be
* shown.
* \param phase An integer indicated a phase. The maximum number of phases
* is used to show a progress bar.
* is used to show a progress bar. The values are between 0 and 8200.
* \param loop_index If the call is from a loop, the current loop index.
* \param loop_size The number of loop iterations. Used to smooth update
* e.g. a progress bar.
@ -551,15 +551,14 @@ void MainLoop::renderGUI(int phase, int loop_index, int loop_size)
{
return;
}
// TODO: Rendering past 7000 causes the minimap to not work
// Rendering past phase 7000 causes the minimap to not work
// on higher graphical settings
//if(phase>7000) return;
if(phase>7000) return;
uint64_t now = StkTime::getRealTimeMs();
float dt = (now - m_curr_time)/1000.0f;
// TODO: re-enable: Don't render if there frame rate would be too high (which would
// slow down loading time).
// if(dt<1.0/30.0f) return;
if(dt<1.0/30.0f) return;
m_curr_time = now;
@ -574,8 +573,8 @@ void MainLoop::renderGUI(int phase, int loop_index, int loop_size)
irr_driver->update(dt, /*is_loading*/true);
GUIEngine::update(dt);
//TODO: remove debug output
uint64_t now2 = StkTime::getRealTimeMs();
Log::verbose("mainloop", " duration t %llu dt %llu", now, now2-now);
// uint64_t now2 = StkTime::getRealTimeMs();
// Log::verbose("mainloop", " duration t %llu dt %llu", now, now2-now);
#endif
} // renderGUI
/* EOF */