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

Method IsPressed

ReviveXR/InputManager.cpp:284–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284bool InputManager::Action::IsPressed(XrSession session, ovrHandType hand) const
285{
286 XrActionStateGetInfo info = XR_TYPE(ACTION_STATE_GET_INFO);
287 info.action = m_Action;
288 info.subactionPath = m_IsHanded ? s_SubActionPaths[hand] : XR_NULL_PATH;
289 XrActionStateBoolean data = XR_TYPE(ACTION_STATE_BOOLEAN);
290 XrResult rs = xrGetActionStateBoolean(session, &info, &data);
291 assert(XR_SUCCEEDED(rs));
292 return data.changedSinceLastSync && data.currentState;
293}
294
295bool InputManager::Action::IsReleased(XrSession session, ovrHandType hand) const
296{

Callers 1

GetInputStateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected