The open source OpenXR runtime
0
fork

Configure Feed

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

d/steamvr_lh: Add support for new SteamVR display component v3 interface

First try v3 then fallback to v2 should it not be available.

authored by

Gabriele Musco and committed by
Jakob Bornecrantz
23ac7441 9f61b474

+5 -1
+1
src/external/openvr_includes/openvr_driver.h
··· 2743 2743 }; 2744 2744 2745 2745 static const char *IVRDisplayComponent_Version = "IVRDisplayComponent_002"; 2746 + static const char *IVRDisplayComponent_Version3 = "IVRDisplayComponent_003"; 2746 2747 2747 2748 } 2748 2749
+4 -1
src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
··· 140 140 vr::EVRInitError err = driver->Activate(0); 141 141 VERIFY(err == vr::VRInitError_None, std::to_string(err).c_str()); 142 142 143 - auto *display = static_cast<vr::IVRDisplayComponent *>(driver->GetComponent(vr::IVRDisplayComponent_Version)); 143 + auto *display = static_cast<vr::IVRDisplayComponent *>(driver->GetComponent(vr::IVRDisplayComponent_Version3)); 144 + if (display == NULL) { 145 + display = static_cast<vr::IVRDisplayComponent *>(driver->GetComponent(vr::IVRDisplayComponent_Version)); 146 + } 144 147 VERIFY(display, "IVRDisplayComponent is null"); 145 148 #undef VERIFY 146 149