From d26b22eb8f084e211a8c970ad6e3b559c216859b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 2 Oct 2003 03:13:51 +0000 Subject: [PATCH] eliminate RageLog prefsman use --- stepmania/src/RageLog.cpp | 9 +++++++-- stepmania/src/RageLog.h | 2 ++ stepmania/src/StepMania.cpp | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageLog.cpp b/stepmania/src/RageLog.cpp index 5fb7f4611a..ac06597d7c 100644 --- a/stepmania/src/RageLog.cpp +++ b/stepmania/src/RageLog.cpp @@ -16,7 +16,6 @@ #include "RageLog.h" #include "RageUtil.h" #include "RageTimer.h" -#include "PrefsManager.h" #include "RageFile.h" #include #include "ProductInfo.h" @@ -87,6 +86,7 @@ RageLog::RageLog() { m_bEnabled = true; m_bFlush = false; + m_bTimestamping = false; // delete old log files remove( LOG_PATH ); @@ -146,6 +146,11 @@ void RageLog::SetFlushing( bool b ) m_bFlush = b; } +void RageLog::SetTimestamping( bool b ) +{ + m_bTimestamping = b; +} + void RageLog::ShowConsole() { #if defined(WIN32) && !defined(_XBOX) @@ -206,7 +211,7 @@ void RageLog::Warn( const char *fmt, ...) void RageLog::Write( int where, CString str) { - if( PREFSMAN && PREFSMAN->m_bTimestamping ) + if( m_bTimestamping ) str = SecondsToTime(RageTimer::GetTimeSinceStart()) + ": " + str; if( where&WRITE_TO_INFO && m_fileInfo ) diff --git a/stepmania/src/RageLog.h b/stepmania/src/RageLog.h index 777e705672..35566634dc 100644 --- a/stepmania/src/RageLog.h +++ b/stepmania/src/RageLog.h @@ -36,10 +36,12 @@ public: void SetLogging( bool b ); // enable or disable logging void SetFlushing( bool b ); // enable or disable flushing + void SetTimestamping( bool b ); // enable or disable timestamping private: bool m_bEnabled; bool m_bFlush; + bool m_bTimestamping; FILE *m_fileLog, *m_fileInfo; void Write( int, CString ); void UpdateMappedLog(); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 307e1e9b4a..bb9337e2a9 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -637,6 +637,7 @@ int main(int argc, char* argv[]) LOG->SetLogging( PREFSMAN->m_bLogging ); LOG->SetFlushing( PREFSMAN->m_bForceLogFlush ); + LOG->SetTimestamping( PREFSMAN->m_bTimestamping ); CheckSettings();