mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:50:43 +02:00
tally PerformanceTimer records when it is active
This commit is contained in:
parent
c3167444a9
commit
21cd986645
1 changed files with 9 additions and 8 deletions
|
@ -117,11 +117,6 @@ void Stats::updateStats(bool force) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool performanceTimerShouldBeActive = Menu::getInstance()->isOptionChecked(MenuOption::Stats) && _expanded;
|
|
||||||
if (performanceTimerShouldBeActive != PerformanceTimer::isActive()) {
|
|
||||||
PerformanceTimer::setActive(performanceTimerShouldBeActive);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
auto avatarManager = DependencyManager::get<AvatarManager>();
|
auto avatarManager = DependencyManager::get<AvatarManager>();
|
||||||
// we need to take one avatar out so we don't include ourselves
|
// we need to take one avatar out so we don't include ourselves
|
||||||
|
@ -404,7 +399,14 @@ void Stats::updateStats(bool force) {
|
||||||
STAT_UPDATE(lodStatus, "You can see " + DependencyManager::get<LODManager>()->getLODFeedbackText());
|
STAT_UPDATE(lodStatus, "You can see " + DependencyManager::get<LODManager>()->getLODFeedbackText());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool performanceTimerIsActive = PerformanceTimer::isActive();
|
|
||||||
|
bool performanceTimerShouldBeActive = Menu::getInstance()->isOptionChecked(MenuOption::Stats) && _expanded;
|
||||||
|
if (performanceTimerShouldBeActive != PerformanceTimer::isActive()) {
|
||||||
|
PerformanceTimer::setActive(performanceTimerShouldBeActive);
|
||||||
|
}
|
||||||
|
if (performanceTimerShouldBeActive) {
|
||||||
|
PerformanceTimer::tallyAllTimerRecords(); // do this even if we're not displaying them, so they don't stack up
|
||||||
|
}
|
||||||
|
|
||||||
if (performanceTimerShouldBeActive &&
|
if (performanceTimerShouldBeActive &&
|
||||||
Menu::getInstance()->isOptionChecked(MenuOption::DisplayDebugTimingDetails)) {
|
Menu::getInstance()->isOptionChecked(MenuOption::DisplayDebugTimingDetails)) {
|
||||||
|
@ -412,7 +414,6 @@ void Stats::updateStats(bool force) {
|
||||||
_showTimingDetails = true;
|
_showTimingDetails = true;
|
||||||
emit timingExpandedChanged();
|
emit timingExpandedChanged();
|
||||||
}
|
}
|
||||||
PerformanceTimer::tallyAllTimerRecords(); // do this even if we're not displaying them, so they don't stack up
|
|
||||||
|
|
||||||
// we will also include room for 1 line per timing record and a header of 4 lines
|
// we will also include room for 1 line per timing record and a header of 4 lines
|
||||||
// Timing details...
|
// Timing details...
|
||||||
|
@ -457,7 +458,7 @@ void Stats::updateStats(bool force) {
|
||||||
emit timingExpandedChanged();
|
emit timingExpandedChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_expanded && performanceTimerIsActive) {
|
if (_expanded && performanceTimerShouldBeActive) {
|
||||||
if (!_showGameUpdateStats) {
|
if (!_showGameUpdateStats) {
|
||||||
_showGameUpdateStats = true;
|
_showGameUpdateStats = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue