The open source OpenXR runtime
0
fork

Configure Feed

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

st/oxr: Fix uninitialized/invalid timestamps for action_caches

+3 -3
+3 -3
src/xrt/state_trackers/oxr/oxr_input.c
··· 1 - // Copyright 2018-2023, Collabora, Ltd. 1 + // Copyright 2018-2024, Collabora, Ltd. 2 2 // Copyright 2023, NVIDIA CORPORATION. 3 3 // SPDX-License-Identifier: BSL-1.0 4 4 /*! ··· 1071 1071 } 1072 1072 1073 1073 struct oxr_input_value_tagged combined; 1074 - int64_t timestamp; 1074 + int64_t timestamp = time; 1075 1075 1076 1076 /* a cache can only have outputs or inputs, not both */ 1077 1077 if (cache->output_count > 0) { ··· 1230 1230 struct oxr_action_state last = act_attached->any_state; 1231 1231 bool active = false; 1232 1232 bool changed = false; 1233 - XrTime timestamp = 0; 1233 + XrTime timestamp = time_state_monotonic_to_ts_ns(sess->sys->inst->timekeeping, time); 1234 1234 1235 1235 switch (act_attached->act_ref->action_type) { 1236 1236 case XR_ACTION_TYPE_BOOLEAN_INPUT: {