bindings: Don't create broken subpath for haptic output

This macro created two paths for haptics, the first of which was useless/wrong:
/user/hand/*/output/haptics/
/user/hand/*/output/haptics
This commit is contained in:
Christoph Haag 2020-05-04 17:15:50 +02:00
parent c582bde17a
commit 2a58d1225f

View file

@ -889,12 +889,11 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
}, \ }, \
}, },
#define MAKE_OUTPUT(COMPONENT, SUFFIX, OUTPUT) \ #define MAKE_OUTPUT(COMPONENT, OUTPUT) \
{ \ { \
.sub_path = OXR_SUB_ACTION_PATH_LEFT, \ .sub_path = OXR_SUB_ACTION_PATH_LEFT, \
.paths = \ .paths = \
{ \ { \
"/user/hand/left/output/" #COMPONENT "/" #SUFFIX, \
"/user/hand/left/output/" #COMPONENT, \ "/user/hand/left/output/" #COMPONENT, \
NULL, \ NULL, \
}, \ }, \
@ -908,7 +907,6 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
.sub_path = OXR_SUB_ACTION_PATH_RIGHT, \ .sub_path = OXR_SUB_ACTION_PATH_RIGHT, \
.paths = \ .paths = \
{ \ { \
"/user/hand/right/output/" #COMPONENT "/" #SUFFIX, \
"/user/hand/right/output/" #COMPONENT, \ "/user/hand/right/output/" #COMPONENT, \
NULL, \ NULL, \
}, \ }, \
@ -941,7 +939,7 @@ static struct binding_template valve_index_controller_bindings[44] = {
MAKE_INPUT(grip, pose, XRT_INPUT_INDEX_GRIP_POSE) MAKE_INPUT(grip, pose, XRT_INPUT_INDEX_GRIP_POSE)
MAKE_INPUT(aim, pose, XRT_INPUT_INDEX_AIM_POSE) MAKE_INPUT(aim, pose, XRT_INPUT_INDEX_AIM_POSE)
MAKE_OUTPUT(haptic, , XRT_OUTPUT_NAME_INDEX_HAPTIC) MAKE_OUTPUT(haptic, XRT_OUTPUT_NAME_INDEX_HAPTIC)
// clang-format on // clang-format on
}; };
@ -958,7 +956,7 @@ static struct binding_template htc_vive_controller_bindings[24] = {
MAKE_INPUT(grip, pose, XRT_INPUT_VIVE_GRIP_POSE) MAKE_INPUT(grip, pose, XRT_INPUT_VIVE_GRIP_POSE)
MAKE_INPUT(aim, pose, XRT_INPUT_VIVE_AIM_POSE) MAKE_INPUT(aim, pose, XRT_INPUT_VIVE_AIM_POSE)
MAKE_OUTPUT(haptic, , XRT_OUTPUT_NAME_VIVE_HAPTIC) MAKE_OUTPUT(haptic, XRT_OUTPUT_NAME_VIVE_HAPTIC)
// clang-format on // clang-format on
}; };