Fix frame interval not updated on refresh rate change

This commit is contained in:
Patrick Nicolas
2025-03-19 17:43:36 +01:00
parent 6f53c113f2
commit d61932cc1c
+2 -1
View File
@@ -824,7 +824,8 @@ void wivrn_comp_target::render_dynamic_foveation(std::array<to_headset::foveatio
void wivrn_comp_target::set_refresh_rate(float refresh_rate_hz)
{
desc.fps = refresh_rate_hz;
pacer.set_frame_duration(U_TIME_1S_IN_NS / refresh_rate_hz);
c->frame_interval_ns = U_TIME_1S_IN_NS / refresh_rate_hz;
pacer.set_frame_duration(c->frame_interval_ns);
}
wivrn_comp_target::wivrn_comp_target(wivrn::wivrn_session & cnx, struct comp_compositor * c) :