Experiment with nudging the present timing to eliminate time gaps

This commit is contained in:
Henrik Rydgård committed 2023-08-16 14:46:21 +02:00
1 parent 864528303a
commit fb4c167d37
11 files changed
+44 -20

No files matched your search

+2 -1
View File
@@ -115,12 +115,13 @@ static void DrawFrameTiming(UIContext *ctx, const Bounds &bounds) {
ctx->Draw()->SetFontScale(0.5f, 0.5f);
snprintf(statBuf, sizeof(statBuf),
"Mode (interval): %s (%d)"
"Mode (interval): %s (%d) (%s)\n"
"CPU time: %0.1fms\n"
"Timestep: %0.1fms\n"
"Postsleep: %0.1fms\n",
Draw::PresentModeToString(g_frameTiming.presentMode),
g_frameTiming.presentInterval,
g_frameTiming.usePresentTiming ? "new" : "old",
g_frameTiming.cpuTime * 1000.0,
g_frameTiming.timeStep * 1000.0,
g_frameTiming.postSleep * 1000.0