Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6175


Ignore:
Timestamp:
Nov 28, 2009, 11:28:51 PM (14 years ago)
Author:
rgrieder
Message:

And I thought I really though this one through…
The frame rate was shown one frame above the actual one, so it needs a minus one ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/Game.cc

    r6174 r6175  
    307307
    308308            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 low
    310             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;
    311311            this->avgTickTime_ = static_cast<float>(this->periodTickTime_) / framesPerPeriod / 1000.0f;
    312312
Note: See TracChangeset for help on using the changeset viewer.