mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/steamvr_lh: Add support for new SteamVR display component v3 interface
First try v3 then fallback to v2 should it not be available.
This commit is contained in:
parent
9f61b47415
commit
23ac74415d
1
src/external/openvr_includes/openvr_driver.h
vendored
1
src/external/openvr_includes/openvr_driver.h
vendored
|
@ -2743,6 +2743,7 @@ namespace vr
|
|||
};
|
||||
|
||||
static const char *IVRDisplayComponent_Version = "IVRDisplayComponent_002";
|
||||
static const char *IVRDisplayComponent_Version3 = "IVRDisplayComponent_003";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,10 @@ Context::setup_hmd(const char *serial, vr::ITrackedDeviceServerDriver *driver)
|
|||
vr::EVRInitError err = driver->Activate(0);
|
||||
VERIFY(err == vr::VRInitError_None, std::to_string(err).c_str());
|
||||
|
||||
auto *display = static_cast<vr::IVRDisplayComponent *>(driver->GetComponent(vr::IVRDisplayComponent_Version));
|
||||
auto *display = static_cast<vr::IVRDisplayComponent *>(driver->GetComponent(vr::IVRDisplayComponent_Version3));
|
||||
if (display == NULL) {
|
||||
display = static_cast<vr::IVRDisplayComponent *>(driver->GetComponent(vr::IVRDisplayComponent_Version));
|
||||
}
|
||||
VERIFY(display, "IVRDisplayComponent is null");
|
||||
#undef VERIFY
|
||||
|
||||
|
|
Loading…
Reference in a new issue