| 282 | } |
| 283 | |
| 284 | bool 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 | |
| 295 | bool InputManager::Action::IsReleased(XrSession session, ovrHandType hand) const |
| 296 | { |