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

Method GetInputState

Revive/InputManager.cpp:149–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149ovrResult 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
168ovrResult InputManager::SubmitControllerVibration(ovrSession session, ovrControllerType controllerType, const ovrHapticsBuffer* buffer)
169{

Callers 1

ovr_GetInputStateFunction · 0.45

Calls 2

ovr_GetTimeInSecondsFunction · 0.70
GetTypeMethod · 0.45

Tested by

no test coverage detected