From bfa10852a22c75e631f31bc890d8127769dace64 Mon Sep 17 00:00:00 2001 From: Kalila L Date: Sat, 28 Aug 2021 17:37:34 -0400 Subject: [PATCH] Fix OpenVrHelpers.cpp for updating OpenVR to 1.16.8. --- plugins/openvr/src/OpenVrHelpers.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/openvr/src/OpenVrHelpers.cpp b/plugins/openvr/src/OpenVrHelpers.cpp index eed2242602..d22aecaa1f 100644 --- a/plugins/openvr/src/OpenVrHelpers.cpp +++ b/plugins/openvr/src/OpenVrHelpers.cpp @@ -411,6 +411,14 @@ void showMinSpecWarning() { if (!vrOverlay) { qFatal("Unable to initialize SteamVR overlay manager"); } + auto vrChaperone = vr::VRChaperone(); + if (!vrChaperone) { + qFatal("Unable to initialize SteamVR chaperone"); + } + auto vrCompositor = vr::VRCompositor(); + if (!vrCompositor) { + qFatal("Unable to initialize SteamVR compositor"); + } vr::VROverlayHandle_t minSpecFailedOverlay = 0; if (vr::VROverlayError_None != vrOverlay->CreateOverlay(FAILED_MIN_SPEC_OVERLAY_NAME, FAILED_MIN_SPEC_OVERLAY_FRIENDLY_NAME, &minSpecFailedOverlay)) { @@ -443,7 +451,7 @@ void showMinSpecWarning() { }); #endif - vrSystem->ResetSeatedZeroPose(); + vrChaperone->ResetZeroPose(vrCompositor->GetTrackingSpace()); QString imagePath = PathUtils::resourcesPath() + "/images/steam-min-spec-failed.png"; vrOverlay->SetOverlayFromFile(minSpecFailedOverlay, imagePath.toLocal8Bit().toStdString().c_str()); vrOverlay->SetOverlayWidthInMeters(minSpecFailedOverlay, 1.4f);