Game/FPSCounter: change m_fps variable and getFPS() return value from float to double.
MSVC complains about loss of information because sp::Time::seconds() returns double.
This commit is contained in:
parent
c11d71aaaa
commit
50e9300667
2 changed files with 3 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ public :
|
||||||
// Should be called whenever a frame has been rendered.
|
// Should be called whenever a frame has been rendered.
|
||||||
void addFrame();
|
void addFrame();
|
||||||
|
|
||||||
float getFPS() const;
|
double getFPS() const;
|
||||||
|
|
||||||
// Set the update rate (in seconds).
|
// Set the update rate (in seconds).
|
||||||
// How often the FPS should be sampled and calculated.
|
// How often the FPS should be sampled and calculated.
|
||||||
|
|
@ -42,7 +42,7 @@ private :
|
||||||
Time m_updateRate;
|
Time m_updateRate;
|
||||||
|
|
||||||
// Calculated Frames per second.
|
// Calculated Frames per second.
|
||||||
float m_fps;
|
double m_fps;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ void FPSCounter::addFrame()
|
||||||
m_count++;
|
m_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
float FPSCounter::getFPS() const
|
double FPSCounter::getFPS() const
|
||||||
{
|
{
|
||||||
return m_fps;
|
return m_fps;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue