Skip to content

Commit

Permalink
Merge pull request #1830 from nicolasnoble/psyqo-frame-counter
Browse files Browse the repository at this point in the history
Clarifying getFrameCount, and making it reliable.
  • Loading branch information
nicolasnoble authored Jan 5, 2025
2 parents 2831e70 + 6e6018a commit b0721ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mips/psyqo/gpu.hh
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,13 @@ class GPU {
* @details This returns the internal frame counter being kept by the
* GPU class. The 32 bits value will wrap around when it reaches 2^32
* frames, which is 2 years, 3 months, 7 days, 6 hours, 6 minutes and
* 28.27 seconds when running constantly at a 60Hz refresh rate.
* 28.27 seconds when running constantly at a 60Hz refresh rate. This
* counter will be incremented during the frame flip operation by the
* appropriate number of hardware frames which have passed since the
* last frame flip. In other words, this counter monotonically increases
* by one for each vsync event that occurred during the last rendering.
*/
uint32_t getFrameCount() const { return m_frameCount; }
uint32_t getFrameCount() const { return m_previousFrameCount; }

/**
* @brief Get the index of the current display buffer.
Expand Down

0 comments on commit b0721ec

Please sign in to comment.