1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-11 00:44:33 +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->eventTraversal();
mViewer->updateTraversal(); mViewer->updateTraversal();
// update GUI by world data
{ {
ScopedProfile<UserStatsType::WindowManager> profile(frameStart, frameNumber, *timer, *stats); 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 mLuaWorker->allowUpdate(); // if there is a separate Lua thread, it starts the update now