summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-09-29 09:43:03 -0400
committerLioncash <mathew1800@gmail.com>2015-09-29 09:43:03 -0400
commitbf23fcfc1fc838fd7ee8dc75dce46fbd7f432945 (patch)
tree5676d44930c33c77757fea6f577b1d60f32508e1 /Source/Core/VideoCommon
parent6a27f1bbf6422f898f3478e7d6edbf1fdba97c39 (diff)
FPSCounter: Don't provide direct access to m_fps
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/FPSCounter.h5
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/FPSCounter.h b/Source/Core/VideoCommon/FPSCounter.h
index 21539099db..a67939e287 100644
--- a/Source/Core/VideoCommon/FPSCounter.h
+++ b/Source/Core/VideoCommon/FPSCounter.h
@@ -11,16 +11,17 @@
class FPSCounter
{
public:
- unsigned int m_fps;
-
// Initializes the FPS counter.
FPSCounter();
// Called when a frame is rendered. Returns the value to be displayed on
// screen as the FPS counter (updated every second).
int Update();
+
+ unsigned int GetFPS() const { return m_fps; }
private:
+ unsigned int m_fps;
unsigned int m_counter;
unsigned int m_fps_last_counter;
Common::Timer m_update_time;
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index 55a6cb8760..a35e3fe94e 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -295,7 +295,7 @@ void Renderer::DrawDebugText()
if (g_ActiveConfig.bShowFPS || SConfig::GetInstance().m_ShowFrameCount)
{
if (g_ActiveConfig.bShowFPS)
- final_cyan += StringFromFormat("FPS: %d", g_renderer->m_fps_counter.m_fps);
+ final_cyan += StringFromFormat("FPS: %u", g_renderer->m_fps_counter.GetFPS());
if (g_ActiveConfig.bShowFPS && SConfig::GetInstance().m_ShowFrameCount)
final_cyan += " - ";