Skip to content

Commit

Permalink
[OpenXR] Do not crash if FB keyboard extension does not work
Browse files Browse the repository at this point in the history
The XR_FB_keyboard_tracking extension is deprecated and won't work
starting on MetaOS v72. We should replace it by others like
XR_META_dynamic_object_tracker for example.

In the meantime we should bailout instead of asserting to avoid
a crash that should not happen anyway.
  • Loading branch information
svillar authored and felipeerias committed Nov 15, 2024
1 parent dd638d2 commit 7ba2410
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/openxr/cpp/OpenXRInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ void OpenXRInput::UpdateTrackedKeyboard(const XrFrameState& frameState, XrSpace
.flags = XR_KEYBOARD_TRACKING_QUERY_LOCAL_BIT_FB,
};
XrKeyboardTrackingDescriptionFB kbdDesc;
CHECK_XRCMD(OpenXRExtensions::xrQuerySystemTrackedKeyboardFB(mSession, &queryInfo, &kbdDesc));
if (XR_FAILED(OpenXRExtensions::xrQuerySystemTrackedKeyboardFB(mSession, &queryInfo, &kbdDesc)))
return;

// Check if existing keyboard disappeared or changed, and clear up its state if so
if ((kbdDesc.flags & XR_KEYBOARD_TRACKING_EXISTS_BIT_FB) == 0 ||
Expand Down

0 comments on commit 7ba2410

Please sign in to comment.