Moved sfx thread update to happen after graphics code is finished.

This improves performance since threads in graphics code do not
compete with threads in sfx handling anymore.
This commit is contained in:
hiker 2014-10-16 17:11:15 +11:00
parent e4e0724cb9
commit 4bb1091f3e

View File

@ -138,7 +138,6 @@ void MainLoop::run()
if (!m_abort && !ProfileWorld::isNoGraphics())
{
PROFILER_PUSH_CPU_MARKER("Music/input/GUI", 0x7F, 0x00, 0x00);
SFXManager::get()->update(dt);
input_manager->update(dt);
#ifdef ENABLE_WIIUSE
@ -152,6 +151,13 @@ void MainLoop::run()
irr_driver->update(dt);
PROFILER_POP_CPU_MARKER();
// Update sfx and music after graphics, so that graphics code
// can use as many threads as possible without interfering
// with audia
PROFILER_PUSH_CPU_MARKER("Music/input/GUI", 0x7F, 0x00, 0x00);
SFXManager::get()->update(dt);
PROFILER_POP_CPU_MARKER();
PROFILER_PUSH_CPU_MARKER("Protocol manager update", 0x7F, 0x00, 0x7F);
ProtocolManager::getInstance()->update();
PROFILER_POP_CPU_MARKER();