FPSCounter: Don't provide direct access to m_fps
This commit is contained in:
parent
6a27f1bbf6
commit
bf23fcfc1f
|
@ -11,8 +11,6 @@
|
|||
class FPSCounter
|
||||
{
|
||||
public:
|
||||
unsigned int m_fps;
|
||||
|
||||
// Initializes the FPS counter.
|
||||
FPSCounter();
|
||||
|
||||
|
@ -20,7 +18,10 @@ public:
|
|||
// 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;
|
||||
|
|
|
@ -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 += " - ";
|
||||
|
|
Loading…
Reference in New Issue