Skip to content

Commit b0721ec

Browse files
authored
Merge pull request #1830 from nicolasnoble/psyqo-frame-counter
Clarifying getFrameCount, and making it reliable.
2 parents 2831e70 + 6e6018a commit b0721ec

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/mips/psyqo/gpu.hh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,13 @@ class GPU {
123123
* @details This returns the internal frame counter being kept by the
124124
* GPU class. The 32 bits value will wrap around when it reaches 2^32
125125
* frames, which is 2 years, 3 months, 7 days, 6 hours, 6 minutes and
126-
* 28.27 seconds when running constantly at a 60Hz refresh rate.
126+
* 28.27 seconds when running constantly at a 60Hz refresh rate. This
127+
* counter will be incremented during the frame flip operation by the
128+
* appropriate number of hardware frames which have passed since the
129+
* last frame flip. In other words, this counter monotonically increases
130+
* by one for each vsync event that occurred during the last rendering.
127131
*/
128-
uint32_t getFrameCount() const { return m_frameCount; }
132+
uint32_t getFrameCount() const { return m_previousFrameCount; }
129133

130134
/**
131135
* @brief Get the index of the current display buffer.

0 commit comments

Comments
 (0)