Changeset 6175 for code/branches/presentation2/src/libraries/core/Game.cc
- Timestamp:
- Nov 28, 2009, 11:28:51 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/Game.cc
r6174 r6175 307 307 308 308 uint32_t framesPerPeriod = this->statisticsTickTimes_.size(); 309 // Why plus 1? No idea, but otherwise the fps rate is always (from 10 to 200!) one frame too low310 this->avgFPS_ = 1 + static_cast<float>(framesPerPeriod) / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0f;309 // Why minus 1? No idea, but otherwise the fps rate is always (from 10 to 200!) one frame too low 310 this->avgFPS_ = -1 + static_cast<float>(framesPerPeriod) / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0f; 311 311 this->avgTickTime_ = static_cast<float>(this->periodTickTime_) / framesPerPeriod / 1000.0f; 312 312
Note: See TracChangeset
for help on using the changeset viewer.