1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:53:51 +00:00

Don't redundantly call notify on every frame.

This commit is contained in:
madsbuvi 2021-05-16 18:09:48 +02:00
parent 5b9a2b73b0
commit f3e17e7c52

View file

@ -44,7 +44,7 @@ namespace MWRender
void operator () (osg::RenderInfo& renderInfo) const override void operator () (osg::RenderInfo& renderInfo) const override
{ {
std::lock_guard<std::mutex> lock(mMutex); std::lock_guard<std::mutex> lock(mMutex);
if (renderInfo.getState()->getFrameStamp()->getFrameNumber() >= mFrame) if (renderInfo.getState()->getFrameStamp()->getFrameNumber() >= mFrame && !mDone)
{ {
mDone = true; mDone = true;
mCondition.notify_one(); mCondition.notify_one();