mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 06:01:13 +00:00
Fix stats overlay being off by 1 FPS
This commit is contained in:
@@ -118,7 +118,9 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Flip stats roughly every second
|
// Flip stats roughly every second
|
||||||
if (now - currentVideoStats.startTime > 1.0f) {
|
if (now - currentVideoStats.startTime >= 1.0f) {
|
||||||
|
currentVideoStats.endTime = now;
|
||||||
|
|
||||||
[videoStatsLock lock];
|
[videoStatsLock lock];
|
||||||
lastVideoStats = currentVideoStats;
|
lastVideoStats = currentVideoStats;
|
||||||
[videoStatsLock unlock];
|
[videoStatsLock unlock];
|
||||||
@@ -135,7 +137,6 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit)
|
|||||||
|
|
||||||
currentVideoStats.receivedFrames++;
|
currentVideoStats.receivedFrames++;
|
||||||
currentVideoStats.totalFrames++;
|
currentVideoStats.totalFrames++;
|
||||||
currentVideoStats.endTime = now;
|
|
||||||
|
|
||||||
PLENTRY entry = decodeUnit->bufferList;
|
PLENTRY entry = decodeUnit->bufferList;
|
||||||
while (entry != NULL) {
|
while (entry != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user