1
0
forked from mirrors/0ad

Fix negative 'unlogged' time in profiler at start of game.

Remove redundant Reset call.

This was SVN commit r9047.
This commit is contained in:
Ykkrosh
2011-03-08 16:58:07 +00:00
parent 8a0cbe009a
commit 51b58328f7
+5 -7
View File
@@ -268,8 +268,6 @@ CProfileNode::CProfileNode( const char* _name, CProfileNode* _parent )
parent = _parent;
display_table = new CProfileNodeTable(this);
Reset();
}
CProfileNode::~CProfileNode()
@@ -667,17 +665,17 @@ void CProfileManager::Frame()
{
ONCE(alloc_hook_initialize());
root->time_frame_current += (timer_Time() - root->start);
root->mallocs_frame_current += (get_memory_alloc_count() - root->start_mallocs);
root->Frame();
if (needs_structural_reset)
{
PerformStructuralReset();
needs_structural_reset = false;
}
root->time_frame_current += (timer_Time() - root->start);
root->mallocs_frame_current += (get_memory_alloc_count() - root->start_mallocs);
root->Frame();
root->start = timer_Time();
root->start_mallocs = get_memory_alloc_count();
}