The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/rift: Add env var to override ICD

DK2 has a fixed IAD way off from my own IOD (and the IAD is the default ICD),
so this env var lets me bring the ICD closer to my actual IOD.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2428>

+14
+14
src/xrt/drivers/rift/rift_hmd.c
··· 603 603 info.fov[0] = 93; 604 604 info.fov[1] = 93; 605 605 606 + char *icd_str = getenv("RIFT_OVERRIDE_ICD"); 607 + if (icd_str != NULL) { 608 + // mm -> meters 609 + float icd = strtof(icd_str, NULL) / 1000.0f; 610 + 611 + // 0 is error, and less than zero is invalid 612 + if (icd > 0.0f) { 613 + hmd->extra_display_info.icd = icd; 614 + HMD_INFO(hmd, "Forcing ICD to %f", hmd->extra_display_info.icd); 615 + } else { 616 + HMD_ERROR(hmd, "Failed to parse ICD override, expected float in millimeters, got %s", icd_str); 617 + } 618 + } 619 + 606 620 if (!u_device_setup_split_side_by_side(&hmd->base, &info)) { 607 621 HMD_ERROR(hmd, "Failed to setup basic device info"); 608 622 goto error;