MCPcopy Create free account
hub / github.com/LibreVR/Revive / AttachSession

Method AttachSession

ReviveXR/InputManager.cpp:875–896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873}
874
875ovrResult InputManager::AttachSession(XrSession session)
876{
877 for (XrSpace space : m_ActionSpaces)
878 CHK_XR(xrDestroySpace(space));
879 m_ActionSpaces.clear();
880
881 if (session)
882 {
883 std::vector<XrActionSet> actionSets;
884 for (InputDevice* device : m_InputDevices)
885 {
886 device->GetActionSpaces(session, m_ActionSpaces);
887 actionSets.push_back(device->ActionSet());
888 }
889
890 XrSessionActionSetsAttachInfo attachInfo = XR_TYPE(SESSION_ACTION_SETS_ATTACH_INFO);
891 attachInfo.countActionSets = (uint32_t)actionSets.size();
892 attachInfo.actionSets = actionSets.data();
893 CHK_XR(xrAttachSessionActionSets(session, &attachInfo));
894 }
895 return ovrSuccess;
896}
897
898ovrResult InputManager::SyncInputState(XrSession session, XrDuration displayPeriod)
899{

Callers 2

StartSessionMethod · 0.80
DestroySessionMethod · 0.80

Calls 4

clearMethod · 0.80
ActionSetMethod · 0.80
sizeMethod · 0.80
GetActionSpacesMethod · 0.45

Tested by

no test coverage detected