mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-08 09:37:53 +00:00
Pause frame updates when the window is minimized (Fixes #1868)
This commit is contained in:
parent
24e5a90bab
commit
2379c0ada7
@ -86,6 +86,11 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
|||||||
// update input
|
// update input
|
||||||
MWBase::Environment::get().getInputManager()->update(frametime, false);
|
MWBase::Environment::get().getInputManager()->update(frametime, false);
|
||||||
|
|
||||||
|
// When the window is minimized, pause everything. Currently this *has* to be here to work around a MyGUI bug.
|
||||||
|
// If we are not currently rendering, then RenderItems will not be reused resulting in a memory leak upon changing widget textures.
|
||||||
|
if (!mOgre->getWindow()->isActive() || !mOgre->getWindow()->isVisible())
|
||||||
|
return true;
|
||||||
|
|
||||||
// sound
|
// sound
|
||||||
if (mUseSound)
|
if (mUseSound)
|
||||||
MWBase::Environment::get().getSoundManager()->update(frametime);
|
MWBase::Environment::get().getSoundManager()->update(frametime);
|
||||||
|
Loading…
Reference in New Issue
Block a user