Skip to content

Refactor PresentThread for configurable timer loop (Spiky frametime fix) - #65

Closed
sniperspy69 wants to merge 1 commit into
Jetsku:mainfrom
sniperspy69:Frametime-fix
Closed

sniperspy69 wants to merge 1 commit into
Jetsku:mainfrom
sniperspy69:Frametime-fix

Conversation

@sniperspy69

Copy link
Copy Markdown
Contributor

Improve frame timing behavior in videoOut.cpp. Fixing spiky frametimes.

{CDF64EAF-914D-4A1F-A3A2-2AE82F5F4074}

Jetsku added a commit that referenced this pull request Oct 20, 2026
…LANK

PR #65 replaced the present thread's relative timeline for every game.
Its absolute timeline skips a missed vblank instead of repaying it, so
games that pace from vblank counts see fewer vblank and flip events
whenever the presenter overruns; the old catch-up kept the average rate
exact. That is a behaviour change worth an A/B per game, not a default.

KYTY_PRESENT_ABS_VBLANK=1 (live switch, default off) selects the PR's
timeline and its immediate-mode flip polling; unset, the loop is the old
relative one, unchanged. The timeline now restarts when the switch turns
on or the refresh rate changes (the PR kept its origin and index across
a rate change, which shifted every later deadline), and the relative
wait is reset when the switch turns off. KYTY_PRESENT_UNLOCKED is
independent: it only changes FlipQueue::Flip, which both timelines call.

Co-Authored-By: Jetsku <59046009+Jetsku@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jetsku added a commit that referenced this pull request Oct 20, 2026
…into gtapipe

Co-Authored-By: Jetsku <59046009+Jetsku@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jetsku

Jetsku commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Has been merged and added to a release

@Jetsku Jetsku closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants