forked from teamnwah/openmw-tes3coop
Pause frame updates when the window is minimized (Fixes #1868)
This commit is contained in:
parent
b9856cc382
commit
58f92f3659
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue