make LogFPS a self-registering pref
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include "RageSurface_Save_BMP.h"
|
||||
#include "SDL_rotozoom.h"
|
||||
#include "RageSurface.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "Preference.h"
|
||||
|
||||
//
|
||||
// Statistics stuff
|
||||
@@ -30,6 +30,8 @@ static int g_iFramesRenderedSinceLastCheck,
|
||||
|
||||
RageDisplay* DISPLAY = NULL;
|
||||
|
||||
Preference<bool> LOG_FPS( Debug, "LogFPS", true );
|
||||
|
||||
CString RageDisplay::PixelFormatToString( PixelFormat pixfmt )
|
||||
{
|
||||
const CString s[NUM_PIX_FORMATS] = {
|
||||
@@ -109,7 +111,7 @@ void RageDisplay::ProcessStatsOnFlip()
|
||||
g_iCFPS = g_iFramesRenderedSinceLastReset / g_iNumChecksSinceLastReset;
|
||||
g_iVPF = g_iVertsRenderedSinceLastCheck / g_iFPS;
|
||||
g_iFramesRenderedSinceLastCheck = g_iVertsRenderedSinceLastCheck = 0;
|
||||
if( PREFSMAN->m_bLogFPS )
|
||||
if( LOG_FPS.GetValue() )
|
||||
LOG->Trace( "FPS: %d, CFPS %d, VPF: %d", g_iFPS, g_iCFPS, g_iVPF );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user