Turn the FPSCounter namespace into a class.

This commit is contained in:
Jules Blok
2014-07-13 13:04:25 +02:00
parent 6def4ead01
commit 3b978f7c27
6 changed files with 53 additions and 57 deletions

View File

@ -27,6 +27,7 @@
#include "VideoCommon/AVIDump.h"
#include "VideoCommon/BPFunctions.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FPSCounter.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
@ -898,7 +899,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
// Finish up the current frame, print some stats
if (g_ActiveConfig.bShowFPS)
{
std::string fps = StringFromFormat("FPS: %d\n", s_fps);
std::string fps = StringFromFormat("FPS: %d\n", m_fps_counter.m_fps);
D3D::font.DrawTextScaled(0, 0, 20, 0.0f, 0xFF00FFFF, fps);
}

View File

@ -36,6 +36,7 @@
#include "VideoCommon/BPStructs.h"
#include "VideoCommon/DriverDetails.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FPSCounter.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
@ -335,7 +336,6 @@ Renderer::Renderer()
OSDInternalW = 0;
OSDInternalH = 0;
s_fps=0;
s_ShowEFBCopyRegions_VBO = 0;
s_blendMode = 0;
@ -683,7 +683,7 @@ void Renderer::DrawDebugInfo()
std::string debug_info;
if (g_ActiveConfig.bShowFPS)
debug_info += StringFromFormat("FPS: %d\n", s_fps);
debug_info += StringFromFormat("FPS: %d\n", m_fps_counter.m_fps);
if (SConfig::GetInstance().m_ShowLag)
debug_info += StringFromFormat("Lag: %" PRIu64 "\n", Movie::g_currentLagCount);