From 9aa92cfe30052cf46284a15772e3a207382823d7 Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 18 Oct 2016 09:55:30 +0800 Subject: [PATCH] Fix profiling mode framerate regression --- src/main_loop.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main_loop.cpp b/src/main_loop.cpp index 2810f68d5..29d9a1fad 100644 --- a/src/main_loop.cpp +++ b/src/main_loop.cpp @@ -222,11 +222,14 @@ void MainLoop::run() m_prev_time = m_curr_time; float dt = getLimitedDt(); - // Render the previous frame, and also handle all user input. - PROFILER_PUSH_CPU_MARKER("IrrDriver update", 0x00, 0x00, 0x7F); - irr_driver->update(dt); - PROFILER_POP_CPU_MARKER(); + if (!m_abort && !ProfileWorld::isNoGraphics()) + { + // Render the previous frame, and also handle all user input. + PROFILER_PUSH_CPU_MARKER("IrrDriver update", 0x00, 0x00, 0x7F); + irr_driver->update(dt); + PROFILER_POP_CPU_MARKER(); + } if (World::getWorld()) // race is active if world exists {