From 138fcc49d8e16eabb82b77e763a4be02e82cae89 Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Wed, 22 Jul 2020 00:39:55 +0200 Subject: [PATCH] st/oxr: Fix haptic actions being disabled fixes d226a60a --- src/xrt/state_trackers/oxr/oxr_input.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/xrt/state_trackers/oxr/oxr_input.c b/src/xrt/state_trackers/oxr/oxr_input.c index 0a43f63c1..d482ff14d 100644 --- a/src/xrt/state_trackers/oxr/oxr_input.c +++ b/src/xrt/state_trackers/oxr/oxr_input.c @@ -866,18 +866,18 @@ oxr_action_cache_update(struct oxr_logger *log, return; } + struct oxr_input_value_tagged combined; + int64_t timestamp; + bool is_active; + + /* a cache can only have outputs or inputs, not both */ if (cache->num_outputs > 0) { cache->current.active = true; if (cache->stop_output_time < time) { oxr_action_cache_stop_output(log, sess, cache); } - } - - struct oxr_input_value_tagged combined; - int64_t timestamp; - bool is_active; - if (oxr_input_combine_input(cache->inputs, cache->num_inputs, &combined, - ×tamp, &is_active)) { + } else if (oxr_input_combine_input(cache->inputs, cache->num_inputs, + &combined, ×tamp, &is_active)) { // If the input is not active signal that. if (!is_active) {