mirror of
https://github.com/hyblocker/OpenVR-SpaceCalibrator.git
synced 2026-10-14 15:01:02 +02:00
fix: crash when SteamVR isn't running
This commit is contained in:
1 file changed
+3
@@ -450,6 +450,9 @@ namespace spacecal {
|
||||
}
|
||||
|
||||
bool VRState::isHmdVirtualDesktop() const {
|
||||
if (!vr::VRSystem())
|
||||
return false;
|
||||
|
||||
// VD sets ResourceRoot as "virtualdesktop" on the HMD device
|
||||
std::string szResourceRoot;
|
||||
vr::ETrackedPropertyError err = getSteamVrPropString(vr::k_unTrackedDeviceIndex_Hmd, vr::ETrackedDeviceProperty::Prop_ResourceRoot_String, szResourceRoot);
|
||||
|
||||
Reference in new issue
Block a user