1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 06:53:53 +00:00

Do not update WindowManager by world data when there is no game

This commit is contained in:
Andrei Kortunov 2023-11-12 12:09:54 +04:00
parent e11bee250f
commit 155b07f341

View file

@ -318,9 +318,14 @@ bool OMW::Engine::frame(float frametime)
mViewer->eventTraversal();
mViewer->updateTraversal();
// update GUI by world data
{
ScopedProfile<UserStatsType::WindowManager> profile(frameStart, frameNumber, *timer, *stats);
mWorld->updateWindowManager();
if (mStateManager->getState() != MWBase::StateManager::State_NoGame)
{
mWorld->updateWindowManager();
}
}
mLuaWorker->allowUpdate(); // if there is a separate Lua thread, it starts the update now