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

Method SetControllerVibration

Revive/InputManager.cpp:134–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134ovrResult InputManager::SetControllerVibration(ovrSession session, ovrControllerType controllerType, float frequency, float amplitude)
135{
136 // Clamp the input
137 frequency = std::min(std::max(frequency, 0.0f), 1.0f);
138 amplitude = std::min(std::max(amplitude, 0.0f), 1.0f);
139
140 for (InputDevice* device : m_InputDevices)
141 {
142 if (controllerType & device->GetType() && ConnectedControllers & device->GetType())
143 device->SetVibration(frequency, amplitude);
144 }
145
146 return ovrSuccess;
147}
148
149ovrResult InputManager::GetInputState(ovrSession session, ovrControllerType controllerType, ovrInputState* inputState)
150{

Callers 1

Calls 2

GetTypeMethod · 0.45
SetVibrationMethod · 0.45

Tested by

no test coverage detected