From 0a1fb7e8cb346f69862e4f12c1d7b09d23e2f84c Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Fri, 14 Nov 2025 10:41:02 -0800 Subject: cube: Fix GOOGLE_display_timing desired-present-time calibration. as the name says, we're calculating what the previous present's desired time should have been, which will have IPD added for the next_present_id's presentation. So for example, if we are processing the last presented frame's actualPresentTime, our multiple should be 0, not 1. Now the demo properly locks to 60fps for a 1.0 IPD on my 60Hz display. --- cube/cube.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cube/cube.c b/cube/cube.c index bab9fae8..d28285de 100644 --- a/cube/cube.c +++ b/cube/cube.c @@ -1144,7 +1144,7 @@ void DemoUpdateTargetIPD(struct demo *demo) { } if (calibrate_next) { - int64_t multiple = demo->next_present_id - past[count - 1].presentID; + int64_t multiple = demo->next_present_id - past[count - 1].presentID - 1; demo->prev_desired_present_time = (past[count - 1].actualPresentTime + (multiple * demo->target_IPD)); } free(past); -- cgit v1.2.3