Platform fixes and rework ping

This commit is contained in:
Eduardo Bart
2013-02-24 17:26:19 -03:00
parent a8c175452b
commit 06e2b6eca2
31 changed files with 178 additions and 111 deletions

View File

@@ -184,7 +184,8 @@ void GraphicalApplication::run()
// only update the current time once per frame to gain performance
g_clock.update();
m_backgroundFrameCounter.update();
if(m_backgroundFrameCounter.update())
g_lua.callGlobalField("g_app", "onFps", m_backgroundFrameCounter.getLastFps());
m_foregroundFrameCounter.update();
int sleepMicros = m_backgroundFrameCounter.getMaximumSleepMicros();