| 147 | } |
| 148 | |
| 149 | ovrResult InputManager::GetInputState(ovrSession session, ovrControllerType controllerType, ovrInputState* inputState) |
| 150 | { |
| 151 | memset(inputState, 0, sizeof(ovrInputState)); |
| 152 | |
| 153 | uint32_t types = 0; |
| 154 | for (InputDevice* device : m_InputDevices) |
| 155 | { |
| 156 | if (controllerType & device->GetType() && ConnectedControllers & device->GetType()) |
| 157 | { |
| 158 | if (device->GetInputState(session, inputState)) |
| 159 | types |= device->GetType(); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | inputState->TimeInSeconds = ovr_GetTimeInSeconds(); |
| 164 | inputState->ControllerType = (ovrControllerType)types; |
| 165 | return InputErrorToOvrError(m_LastError); |
| 166 | } |
| 167 | |
| 168 | ovrResult InputManager::SubmitControllerVibration(ovrSession session, ovrControllerType controllerType, const ovrHapticsBuffer* buffer) |
| 169 | { |
no test coverage detected