Fix pacer bug from a8c99ea4c
This commit is contained in:
@@ -44,11 +44,11 @@ void wivrn_pacer::predict(
|
|||||||
std::lock_guard lock(mutex);
|
std::lock_guard lock(mutex);
|
||||||
auto now = os_monotonic_get_ns();
|
auto now = os_monotonic_get_ns();
|
||||||
|
|
||||||
|
next_frame_ns += frame_duration_ns;
|
||||||
|
|
||||||
if (next_frame_ns < now)
|
if (next_frame_ns < now)
|
||||||
next_frame_ns = now;
|
next_frame_ns = now;
|
||||||
|
|
||||||
next_frame_ns += frame_duration_ns;
|
|
||||||
|
|
||||||
out_wake_up_time_ns = next_frame_ns;
|
out_wake_up_time_ns = next_frame_ns;
|
||||||
out_desired_present_time_ns = out_wake_up_time_ns + mean_wake_up_to_present_ns;
|
out_desired_present_time_ns = out_wake_up_time_ns + mean_wake_up_to_present_ns;
|
||||||
out_present_slop_ns = 0;
|
out_present_slop_ns = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user