st/oxr: Fixes for ball on stick bindings

This commit is contained in:
Jakob Bornecrantz 2019-10-11 15:34:00 +01:00
parent bca5899fcc
commit a0a4fa3399
2 changed files with 29 additions and 3 deletions

View file

@ -37,7 +37,7 @@ struct profile_template
static struct binding_template khr_simple_controller_bindings[10];
static struct binding_template google_daydream_controller_bindings[12];
static struct binding_template mnd_ball_on_stick_controller_bindings[24];
static struct binding_template mnd_ball_on_stick_controller_bindings[26];
static struct profile_template profiles[3] = {
{
@ -839,7 +839,7 @@ static struct binding_template google_daydream_controller_bindings[12] = {
*
*/
static struct binding_template mnd_ball_on_stick_controller_bindings[24] = {
static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
{
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
.paths =
@ -1008,6 +1008,19 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[24] = {
0,
},
},
{
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
.paths =
{
"/user/hand/left/output/haptic",
NULL,
},
.outputs =
{
XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION,
0,
},
},
{
.sub_path = OXR_SUB_ACTION_PATH_RIGHT,
.paths =
@ -1176,4 +1189,17 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[24] = {
0,
},
},
{
.sub_path = OXR_SUB_ACTION_PATH_RIGHT,
.paths =
{
"/user/hand/right/output/haptic",
NULL,
},
.outputs =
{
XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION,
0,
},
},
};

View file

@ -110,7 +110,7 @@ oxr_instance_create(struct oxr_logger *log,
cache_path(log, inst, "/interaction_profiles/oculus/go_controller", &inst->path_cache.oculus_go_controller);
cache_path(log, inst, "/interaction_profiles/oculus/touch_controller", &inst->path_cache.oculus_touch_controller);
cache_path(log, inst, "/interaction_profiles/valve/index_controller", &inst->path_cache.valve_index_controller);
cache_path(log, inst, "/interaction_profiles/mnd/ball_on_stick", &inst->path_cache.mnd_ball_on_stick_controller);
cache_path(log, inst, "/interaction_profiles/mnd/ball_on_stick_controller", &inst->path_cache.mnd_ball_on_stick_controller);
// clang-format on
p_ret = xrt_prober_create(&inst->prober);