Merge pull request #15467 from samcake/sol

case 22353: Mac Game loop performances was borked
This commit is contained in:
Simon Walton 2019-04-26 17:19:16 -07:00 committed by GitHub
commit 5ffce7f1a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -182,6 +182,9 @@ public:
continue;
}
#if defined(Q_OS_MAC)
_context->makeCurrent();
#endif
// Execute the frame and present it to the display device.
{
PROFILE_RANGE(render, "PluginPresent")
@ -190,6 +193,10 @@ public:
gl::globalRelease(false);
CHECK_GL_ERROR();
}
#if defined(Q_OS_MAC)
_context->doneCurrent();
#endif
_refreshRateController->sleepThreadIfNeeded(this, currentPlugin->isHmd());
}