| 550 | } |
| 551 | |
| 552 | OVR_PUBLIC_FUNCTION(ovrTouchHapticsDesc) ovr_GetTouchHapticsDesc(ovrSession session, ovrControllerType controllerType) |
| 553 | { |
| 554 | REV_TRACE(ovr_GetTouchHapticsDesc); |
| 555 | MICROPROFILE_META_CPU("Controller Type", controllerType); |
| 556 | |
| 557 | ovrTouchHapticsDesc desc = { 0 }; |
| 558 | if (session && controllerType & ovrControllerType_Touch) |
| 559 | { |
| 560 | if ((*session->CurrentFrame).predictedDisplayPeriod == 0) |
| 561 | desc.SampleRateHz = 0; |
| 562 | else |
| 563 | desc.SampleRateHz = (int)(1000000000i64 / (*session->CurrentFrame).predictedDisplayPeriod); |
| 564 | desc.SampleSizeInBytes = sizeof(uint8_t); |
| 565 | desc.SubmitMaxSamples = OVR_HAPTICS_BUFFER_SAMPLES_MAX; |
| 566 | desc.SubmitMinSamples = 1; |
| 567 | desc.SubmitOptimalSamples = 20; |
| 568 | desc.QueueMinSizeToAvoidStarvation = 5; |
| 569 | } |
| 570 | return desc; |
| 571 | } |
| 572 | |
| 573 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_SetControllerVibration(ovrSession session, ovrControllerType controllerType, float frequency, float amplitude) |
| 574 | { |
nothing calls this directly
no outgoing calls
no test coverage detected