From d7468d22dae4bec52f46045ab7a37409f0424dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Thu, 8 Jun 2023 21:58:58 +0200 Subject: [PATCH] d/wmr: fix squeeze trigger in SteamVR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While in the Monado debug GUI the squeeze trigger is detected fine and it is also listed in the SteamVR "Test Controller" page, pushing the squeeze trigger would not be detected in SteamVR. Fixing this by not just populating the xrt_inputs squeeze click but also the squeeze value. Signed-off-by: Linus Lüssing --- src/xrt/drivers/wmr/wmr_controller_hp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xrt/drivers/wmr/wmr_controller_hp.c b/src/xrt/drivers/wmr/wmr_controller_hp.c index d94fbf080..59397fd1c 100644 --- a/src/xrt/drivers/wmr/wmr_controller_hp.c +++ b/src/xrt/drivers/wmr/wmr_controller_hp.c @@ -284,6 +284,7 @@ wmr_controller_hp_update_xrt_inputs(struct xrt_device *xdev) xrt_inputs[WMR_CONTROLLER_INDEX_X_A_CLICK].value.boolean = cur_inputs->x_a; xrt_inputs[WMR_CONTROLLER_INDEX_Y_B_CLICK].value.boolean = cur_inputs->y_b; xrt_inputs[WMR_CONTROLLER_INDEX_SQUEEZE_CLICK].value.boolean = cur_inputs->squeeze; + xrt_inputs[WMR_CONTROLLER_INDEX_SQUEEZE_VALUE].value.vec1.x = cur_inputs->squeeze; xrt_inputs[WMR_CONTROLLER_INDEX_TRIGGER_VALUE].value.vec1.x = cur_inputs->trigger; xrt_inputs[WMR_CONTROLLER_INDEX_THUMBSTICK_CLICK].value.boolean = cur_inputs->thumbstick.click; xrt_inputs[WMR_CONTROLLER_INDEX_THUMBSTICK].value.vec2 = cur_inputs->thumbstick.values; @@ -343,6 +344,7 @@ wmr_controller_hp_create(struct wmr_controller_connection *conn, SET_INPUT(wcb, MENU_CLICK, MENU_CLICK); SET_INPUT(wcb, HOME_CLICK, HOME_CLICK); SET_INPUT(wcb, SQUEEZE_CLICK, SQUEEZE_CLICK); + SET_INPUT(wcb, SQUEEZE_VALUE, SQUEEZE_VALUE); SET_INPUT(wcb, TRIGGER_VALUE, TRIGGER_VALUE); SET_INPUT(wcb, THUMBSTICK_CLICK, THUMBSTICK_CLICK); SET_INPUT(wcb, THUMBSTICK, THUMBSTICK);