diff --git a/src/graphics/draw_calls.cpp b/src/graphics/draw_calls.cpp index 5b4b4706c..49d4ed167 100644 --- a/src/graphics/draw_calls.cpp +++ b/src/graphics/draw_calls.cpp @@ -34,9 +34,6 @@ #include "utils/profiler.hpp" #include -#ifdef ENABLE_RECORDER -#include -#endif // ---------------------------------------------------------------------------- void DrawCalls::clearLists() @@ -649,15 +646,6 @@ void DrawCalls::prepareDrawCalls( ShadowMatrices& shadow_matrices, PROFILER_POP_CPU_MARKER(); irr_driver->setSkinningJoint(getSkinningOffset()); -#ifdef ENABLE_RECORDER - if (irr_driver->isRecording()) - { - PROFILER_PUSH_CPU_MARKER("- Recording", 0x0, 0x50, 0x40); - ogrCapture(); - PROFILER_POP_CPU_MARKER(); - } -#endif - // Add a 1 s timeout if (!m_sync) m_sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 677ba1cfb..edd4e57aa 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -1964,8 +1964,12 @@ void IrrDriver::update(float dt) //if(World::getWorld() && World::getWorld()->isRacePhase()) // printRenderStats(); #ifdef ENABLE_RECORDER - if (!world && m_recording) + if (m_recording) + { + PROFILER_PUSH_CPU_MARKER("- Recording", 0x0, 0x50, 0x40); ogrCapture(); + PROFILER_POP_CPU_MARKER(); + } #endif } // update