3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 06:55:39 +02:00

Merge pull request from ctrlaltdavid/M17988

Fix Interface eating memory when minimized
This commit is contained in:
John Conklin II 2018-10-29 12:52:10 -07:00 committed by GitHub
commit e01401294f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6040,7 +6040,9 @@ void Application::update(float deltaTime) {
{
PROFILE_RANGE_EX(app, "Overlays", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
PerformanceTimer perfTimer("overlays");
_overlays.update(deltaTime);
if (qApp->shouldPaint()) {
_overlays.update(deltaTime);
}
}
// Update _viewFrustum with latest camera and view frustum data...
@ -6125,8 +6127,10 @@ void Application::update(float deltaTime) {
PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0);
PerformanceTimer perfTimer("postUpdateLambdas");
std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
for (auto& iter : _postUpdateLambdas) {
iter.second();
if (qApp->shouldPaint()) {
for (auto& iter : _postUpdateLambdas) {
iter.second();
}
}
_postUpdateLambdas.clear();
}