fix deadlock on reconnect

This commit is contained in:
Patrick Nicolas
2026-06-09 19:22:36 +02:00
parent a3b40a1b6c
commit e16e713cb6
+9 -5
View File
@@ -403,11 +403,15 @@ void wivrn_session::resume_session()
if (target_fps != current_fps)
{
auto s = settings.lock();
(*this)(from_headset::refresh_rate_changed{
.from = current_fps * s->fps_divider,
.to = target_fps * s->fps_divider,
});
compositor.set_framerate(target_fps);
push_event(
{
.display = {
.type = XRT_SESSION_EVENT_DISPLAY_REFRESH_RATE_CHANGE,
.from_display_refresh_rate_hz = current_fps,
.to_display_refresh_rate_hz = target_fps,
},
});
}
}