Fix profiler, do not sync twice per frame
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user