Set refresh rate on client

This commit is contained in:
Patrick Nicolas
2024-02-03 10:05:54 +01:00
parent c6cc5652a1
commit 6f29061ace
7 changed files with 26 additions and 4 deletions
+1 -2
View File
@@ -216,7 +216,6 @@ wivrn_hmd::wivrn_hmd(std::shared_ptr<xrt::drivers::wivrn::wivrn_session> cnx,
auto scale = config.scale.value_or(std::array<double, 2>{1., 1.});
auto foveated_eye_width = info.recommended_eye_width * scale[0];
auto foveated_eye_height = info.recommended_eye_height * scale[1];
fps = info.preferred_refresh_rate;
// Setup info.
hmd->blend_modes[0] = XRT_BLEND_MODE_OPAQUE;
@@ -225,7 +224,7 @@ wivrn_hmd::wivrn_hmd(std::shared_ptr<xrt::drivers::wivrn::wivrn_session> cnx,
hmd->distortion.preferred = XRT_DISTORTION_MODEL_COMPUTE;
hmd->screens[0].w_pixels = foveated_eye_width * 2;
hmd->screens[0].h_pixels = foveated_eye_height;
hmd->screens[0].nominal_frame_interval_ns = 1000000000 / fps;
hmd->screens[0].nominal_frame_interval_ns = 1000000000 / info.preferred_refresh_rate;
// Left
hmd->views[0].display.w_pixels = eye_width;