Skip to content

Commit e5aab08

Browse files
committed
Added Oculus XR plugin workarounds for invalid time of 0
1 parent 6c5bc75 commit e5aab08

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

virtualdesktop-openxr/hand_tracking.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ namespace virtualdesktop_openxr {
259259
}
260260

261261
if (locateInfo->time <= 0) {
262-
return XR_ERROR_TIME_INVALID;
262+
// Workaround: the OculusXR plugin is passing a time of 0
263+
if (!m_isOculusXrPlugin) {
264+
return XR_ERROR_TIME_INVALID;
265+
}
263266
}
264267

265268
std::shared_lock lock(m_handTrackersMutex);

virtualdesktop-openxr/space.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ namespace virtualdesktop_openxr {
209209
}
210210

211211
if (time <= 0) {
212-
return XR_ERROR_TIME_INVALID;
212+
// Workaround: the OculusXR plugin is passing a time of 0 during early init and will refuse to submit frames
213+
// if we error out.
214+
if (!m_isOculusXrPlugin) {
215+
return XR_ERROR_TIME_INVALID;
216+
}
213217
}
214218

215219
XrSpaceVelocity* velocity = reinterpret_cast<XrSpaceVelocity*>(location->next);

0 commit comments

Comments
 (0)