The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

authored by

Christoph Haag and committed by
Jakob Bornecrantz
2c818d50 88ce6b5d

+3
+2
src/xrt/include/xrt/xrt_defines.h
··· 10 10 #pragma once 11 11 12 12 #include "xrt/xrt_compiler.h" 13 + #include "util/u_time.h" 13 14 14 15 #ifdef __cplusplus 15 16 extern "C" { ··· 547 548 { 548 549 float frequency; 549 550 float amplitude; 551 + time_duration_ns duration; 550 552 } vibration; 551 553 }; 552 554
+1
src/xrt/state_trackers/oxr/oxr_input.c
··· 1189 1189 union xrt_output_value value = {0}; 1190 1190 value.vibration.frequency = data->frequency; 1191 1191 value.vibration.amplitude = data->amplitude; 1192 + value.vibration.duration = data->duration; 1192 1193 1193 1194 for (uint32_t i = 0; i < cache->num_outputs; i++) { 1194 1195 struct oxr_source_output *output = &cache->outputs[i];