From 66246afeb7b0b754579d923bf46673654248816a Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 12 Sep 2004 18:14:39 +0000 Subject: [PATCH] add pref bLogFPS --- stepmania/src/PrefsManager.cpp | 3 +++ stepmania/src/PrefsManager.h | 1 + stepmania/src/RageDisplay.cpp | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 2ff91661e2..f24e196a74 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -278,6 +278,7 @@ void PrefsManager::Init() m_bTimestamping = false; m_bLogSkips = false; m_bLogCheckpoints = false; + m_bLogFPS = true; m_bShowLoadingWindow = true; m_bMemoryCards = false; @@ -551,6 +552,7 @@ void PrefsManager::ReadPrefsFromFile( CString sIni ) ini.GetValue( "Debug", "Timestamping", m_bTimestamping ); ini.GetValue( "Debug", "LogSkips", m_bLogSkips ); ini.GetValue( "Debug", "LogCheckpoints", m_bLogCheckpoints ); + ini.GetValue( "Debug", "LogFPS", m_bLogFPS ); ini.GetValue( "Debug", "ShowLoadingWindow", m_bShowLoadingWindow ); } @@ -791,6 +793,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const ini.SetValue( "Debug", "Timestamping", m_bTimestamping ); ini.SetValue( "Debug", "LogSkips", m_bLogSkips ); ini.SetValue( "Debug", "LogCheckpoints", m_bLogCheckpoints ); + ini.SetValue( "Debug", "LogFPS", m_bLogFPS ); ini.SetValue( "Debug", "ShowLoadingWindow", m_bShowLoadingWindow ); ini.WriteFile( STEPMANIA_INI_PATH ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 0bb00062b8..ccd97a2d8e 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -268,6 +268,7 @@ public: bool m_bTimestamping; bool m_bLogSkips; bool m_bLogCheckpoints; + bool m_bLogFPS; bool m_bShowLoadingWindow; /* Game-specific prefs: */ diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index f372d5733f..2dbbd4df6e 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -10,6 +10,7 @@ #include "RageSurface_Save_BMP.h" #include "SDL_rotozoom.h" #include "RageSurface.h" +#include "PrefsManager.h" // // Statistics stuff @@ -108,7 +109,8 @@ void RageDisplay::ProcessStatsOnFlip() g_iCFPS = g_iFramesRenderedSinceLastReset / g_iNumChecksSinceLastReset; g_iVPF = g_iVertsRenderedSinceLastCheck / g_iFPS; g_iFramesRenderedSinceLastCheck = g_iVertsRenderedSinceLastCheck = 0; - LOG->Trace( "FPS: %d, CFPS %d, VPF: %d", g_iFPS, g_iCFPS, g_iVPF ); + if( PREFSMAN->m_bLogFPS ) + LOG->Trace( "FPS: %d, CFPS %d, VPF: %d", g_iFPS, g_iCFPS, g_iVPF ); } }