enforce even height

This commit is contained in:
Patrick Nicolas
2024-02-18 16:15:55 +01:00
parent 0bc8380abb
commit c848fe4641
+3 -2
View File
@@ -215,8 +215,9 @@ wivrn_hmd::wivrn_hmd(std::shared_ptr<xrt::drivers::wivrn::wivrn_session> cnx,
auto eye_width = info.recommended_eye_width; // * config.scale.value_or(1);
auto eye_height = info.recommended_eye_height; // * config.scale.value_or(1);
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];
int foveated_eye_width = info.recommended_eye_width * scale[0];
int foveated_eye_height = info.recommended_eye_height * scale[1];
foveated_eye_height += foveated_eye_height % 2;
// Setup info.
hmd->blend_modes[0] = XRT_BLEND_MODE_OPAQUE;