| 66 | } |
| 67 | |
| 68 | ovrResult InputManager::GetInputState(ovrSession session, ovrControllerType controllerType, ovrInputState* inputState) |
| 69 | { |
| 70 | memset(inputState, 0, sizeof(ovrInputState)); |
| 71 | |
| 72 | if (controllerType == ovrControllerType_Active) |
| 73 | controllerType = ovrControllerType_Touch; |
| 74 | |
| 75 | for (InputDevice* device : m_InputDevices) |
| 76 | { |
| 77 | ovrControllerType type = device->GetType(); |
| 78 | if (controllerType & type && device->IsConnected()) |
| 79 | device->GetInputState(session->Session, controllerType, inputState); |
| 80 | } |
| 81 | |
| 82 | inputState->TimeInSeconds = ovr_GetTimeInSeconds(); |
| 83 | inputState->ControllerType = controllerType; |
| 84 | return ovrSuccess; |
| 85 | } |
| 86 | |
| 87 | ovrResult InputManager::SubmitControllerVibration(ovrSession session, ovrControllerType controllerType, const ovrHapticsBuffer* buffer) |
| 88 | { |
no test coverage detected