fix: crash when SteamVR isn't running

This commit is contained in:
Hyblocker committed 2026-07-24 13:11:22 +02:00
1 parent f8792559b0
commit c66fa95d4e
1 file changed
+3
+3
View File
@@ -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);