| 132 | } |
| 133 | |
| 134 | ovrResult 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 | |
| 149 | ovrResult InputManager::GetInputState(ovrSession session, ovrControllerType controllerType, ovrInputState* inputState) |
| 150 | { |
no test coverage detected