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

Method GetInputState

ReviveXR/InputManager.cpp:68–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68ovrResult 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
87ovrResult InputManager::SubmitControllerVibration(ovrSession session, ovrControllerType controllerType, const ovrHapticsBuffer* buffer)
88{

Callers 1

ovr_GetInputStateFunction · 0.45

Calls 8

GetVectorMethod · 0.80
ovr_GetTimeInSecondsFunction · 0.70
GetTypeMethod · 0.45
IsConnectedMethod · 0.45
GetDigitalMethod · 0.45
UseHackMethod · 0.45
GetAnalogMethod · 0.45
IsPressedMethod · 0.45

Tested by

no test coverage detected