mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
xrt: Add duration to xrt_output_value
The Vive Controller driver benefits from knowing the duration because the hardware supports vibrating for a specific duration.
This commit is contained in:
parent
88ce6b5dcc
commit
2c818d5051
|
@ -10,6 +10,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "xrt/xrt_compiler.h"
|
||||
#include "util/u_time.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -547,6 +548,7 @@ union xrt_output_value {
|
|||
{
|
||||
float frequency;
|
||||
float amplitude;
|
||||
time_duration_ns duration;
|
||||
} vibration;
|
||||
};
|
||||
|
||||
|
|
|
@ -1189,6 +1189,7 @@ set_source_output_vibration(struct oxr_session *sess,
|
|||
union xrt_output_value value = {0};
|
||||
value.vibration.frequency = data->frequency;
|
||||
value.vibration.amplitude = data->amplitude;
|
||||
value.vibration.duration = data->duration;
|
||||
|
||||
for (uint32_t i = 0; i < cache->num_outputs; i++) {
|
||||
struct oxr_source_output *output = &cache->outputs[i];
|
||||
|
|
Loading…
Reference in a new issue