From 84a8f056d728ef40657ba457ba9936d63008414a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 12 Jan 2004 00:31:43 +0000 Subject: [PATCH] fix metrics sometimes not being updated --- stepmania/src/SongManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index e8058154ae..3bb3e893b6 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -53,7 +53,7 @@ RageTimer g_LastMetricUpdate; /* can't use RageTimer globally */ static void UpdateMetrics() { - if( g_LastMetricUpdate.PeekDeltaTime() < 1 ) + if( !g_LastMetricUpdate.IsZero() && g_LastMetricUpdate.PeekDeltaTime() < 1 ) return; g_LastMetricUpdate.Touch(); @@ -72,6 +72,9 @@ static void UpdateMetrics() SongManager::SongManager( LoadingWindow *ld ) { + g_LastMetricUpdate.SetZero(); + UpdateMetrics(); + /* We initialize things that assume they can get at SONGMAN; we only * init one of these, so hook us up to it immediately. */ SONGMAN = this; @@ -85,9 +88,6 @@ SongManager::SongManager( LoadingWindow *ld ) SONGMAN = NULL; throw; } - - g_LastMetricUpdate.SetZero(); - UpdateMetrics(); } SongManager::~SongManager()