Fix profiler, do not sync twice per frame

This commit is contained in:
Marianne Gagnon
2014-09-04 19:45:16 -04:00
parent 0d7a425aac
commit 0848087b1d
2 changed files with 2 additions and 4 deletions

View File

@@ -160,8 +160,6 @@ void MainLoop::run()
PROFILER_PUSH_CPU_MARKER("Database polling update", 0x00, 0x7F, 0x7F);
Online::RequestManager::get()->update(dt);
PROFILER_POP_CPU_MARKER();
PROFILER_SYNC_FRAME();
}
else if (!m_abort && ProfileWorld::isNoGraphics())
{
@@ -174,8 +172,8 @@ void MainLoop::run()
PROFILER_POP_CPU_MARKER();
}
PROFILER_SYNC_FRAME();
PROFILER_POP_CPU_MARKER();
PROFILER_SYNC_FRAME();
} // while !m_abort
} // run

View File

@@ -264,7 +264,7 @@ void Profiler::draw()
// Force to show the pointer
irr_driver->showPointer();
int read_id = (m_freeze_state == FROZEN ? !m_write_id : m_write_id);
int read_id = !m_write_id;
// Compute some values for drawing (unit: pixels, but we keep floats for reducing errors accumulation)
core::dimension2d<u32> screen_size = driver->getScreenSize();