mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
st/oxr: Properly name MNDX_ball_on_a_stick_controller
This commit is contained in:
parent
fd8e19718c
commit
59b7bdeee0
|
@ -18,6 +18,7 @@ EXTENSIONS = (
|
|||
['XR_MND_headless'],
|
||||
['XR_EXTX_overlay'],
|
||||
['XR_MNDX_egl_enable', 'XR_USE_PLATFORM_EGL', 'XR_USE_GRAPHICS_API_OPENGL'],
|
||||
['XR_MNDX_ball_on_a_stick_controller'],
|
||||
)
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
|
|
|
@ -219,9 +219,9 @@
|
|||
]
|
||||
},
|
||||
|
||||
"/interaction_profiles/mnd/ball_on_a_stick_controller": {
|
||||
"/interaction_profiles/mndx/ball_on_a_stick_controller": {
|
||||
"title": "Monado ball on a stick controller",
|
||||
"extension": "XR_MND_ball_on_a_stick_controller",
|
||||
"extension": "XR_MNDX_ball_on_a_stick_controller",
|
||||
"user_paths": [
|
||||
"/user/hand/left",
|
||||
"/user/hand/right"
|
||||
|
@ -231,13 +231,13 @@
|
|||
{"subpath": "/input/menu/click"},
|
||||
{"subpath": "/input/start/click"},
|
||||
{"subpath": "/input/select/click"},
|
||||
{"subpath": "/input/square_mnd/click"},
|
||||
{"subpath": "/input/cross_mnd/click"},
|
||||
{"subpath": "/input/circle_mnd/click"},
|
||||
{"subpath": "/input/triangle_mnd/click"},
|
||||
{"subpath": "/input/square_mndx/click"},
|
||||
{"subpath": "/input/cross_mndx/click"},
|
||||
{"subpath": "/input/circle_mndx/click"},
|
||||
{"subpath": "/input/triangle_mndx/click"},
|
||||
{"subpath": "/input/trigger/value"},
|
||||
{"subpath": "/input/grip/pose"},
|
||||
{"subpath": "/input/ball_mnd/pose"},
|
||||
{"subpath": "/input/ball_mndx/pose"},
|
||||
{"subpath": "/input/aim/pose"},
|
||||
{"subpath": "/output/haptic"}
|
||||
]
|
||||
|
|
|
@ -140,8 +140,8 @@ oxr_xrSuggestInteractionProfileBindings(
|
|||
func = oxr_verify_oculus_touch_controller_subpath;
|
||||
} else if (ip == inst->path_cache.valve_index_controller) {
|
||||
func = oxr_verify_valve_index_controller_subpath;
|
||||
} else if (ip == inst->path_cache.mnd_ball_on_stick_controller) {
|
||||
func = oxr_verify_mnd_ball_on_a_stick_controller_subpath;
|
||||
} else if (ip == inst->path_cache.mndx_ball_on_a_stick_controller) {
|
||||
func = oxr_verify_mndx_ball_on_a_stick_controller_subpath;
|
||||
} else {
|
||||
return oxr_error(
|
||||
&log, XR_ERROR_PATH_UNSUPPORTED,
|
||||
|
|
|
@ -241,7 +241,7 @@ oxr_find_profile_for_device(struct oxr_logger *log,
|
|||
case XRT_DEVICE_PSMV:
|
||||
// clang-format off
|
||||
interaction_profile_find(log, inst, inst->path_cache.khr_simple_controller, out_p);
|
||||
interaction_profile_find(log, inst, inst->path_cache.mnd_ball_on_stick_controller, out_p);
|
||||
interaction_profile_find(log, inst, inst->path_cache.mndx_ball_on_a_stick_controller, out_p);
|
||||
// clang-format on
|
||||
return;
|
||||
case XRT_DEVICE_DAYDREAM:
|
||||
|
|
|
@ -430,7 +430,7 @@ static struct binding_template google_daydream_controller_bindings[12] = {
|
|||
*
|
||||
*/
|
||||
|
||||
static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
||||
static struct binding_template mndx_ball_on_a_stick_controller_bindings[26] = {
|
||||
{
|
||||
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
|
||||
.paths =
|
||||
|
@ -491,8 +491,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/left/input/square_mnd/click",
|
||||
"/user/hand/left/input/square_mnd",
|
||||
"/user/hand/left/input/square_mndx/click",
|
||||
"/user/hand/left/input/square_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -505,8 +505,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/left/input/cross_mnd/click",
|
||||
"/user/hand/left/input/cross_mnd",
|
||||
"/user/hand/left/input/cross_mndx/click",
|
||||
"/user/hand/left/input/cross_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -519,8 +519,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/left/input/circle_mnd/click",
|
||||
"/user/hand/left/input/circle_mnd",
|
||||
"/user/hand/left/input/circle_mndx/click",
|
||||
"/user/hand/left/input/circle_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -533,8 +533,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/left/input/triangle_mnd/click",
|
||||
"/user/hand/left/input/triangle_mnd",
|
||||
"/user/hand/left/input/triangle_mndx/click",
|
||||
"/user/hand/left/input/triangle_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -575,8 +575,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_LEFT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/left/input/ball_mnd/pose",
|
||||
"/user/hand/left/input/ball_mnd",
|
||||
"/user/hand/left/input/ball_mndx/pose",
|
||||
"/user/hand/left/input/ball_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -672,8 +672,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_RIGHT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/right/input/square_mnd/click",
|
||||
"/user/hand/right/input/square_mnd",
|
||||
"/user/hand/right/input/square_mndx/click",
|
||||
"/user/hand/right/input/square_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -686,8 +686,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_RIGHT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/right/input/cross_mnd/click",
|
||||
"/user/hand/right/input/cross_mnd",
|
||||
"/user/hand/right/input/cross_mndx/click",
|
||||
"/user/hand/right/input/cross_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -700,8 +700,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_RIGHT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/right/input/circle_mnd/click",
|
||||
"/user/hand/right/input/circle_mnd",
|
||||
"/user/hand/right/input/circle_mndx/click",
|
||||
"/user/hand/right/input/circle_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -714,8 +714,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_RIGHT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/right/input/triangle_mnd/click",
|
||||
"/user/hand/right/input/triangle_mnd",
|
||||
"/user/hand/right/input/triangle_mndx/click",
|
||||
"/user/hand/right/input/triangle_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -756,8 +756,8 @@ static struct binding_template mnd_ball_on_stick_controller_bindings[26] = {
|
|||
.sub_path = OXR_SUB_ACTION_PATH_RIGHT,
|
||||
.paths =
|
||||
{
|
||||
"/user/hand/right/input/ball_mnd/pose",
|
||||
"/user/hand/right/input/ball_mnd",
|
||||
"/user/hand/right/input/ball_mndx/pose",
|
||||
"/user/hand/right/input/ball_mndx",
|
||||
NULL,
|
||||
},
|
||||
.inputs =
|
||||
|
@ -972,9 +972,9 @@ static struct profile_template profiles[5] = {
|
|||
.num_bindings = ARRAY_SIZE(google_daydream_controller_bindings),
|
||||
},
|
||||
{
|
||||
.path = "/interaction_profiles/mnd/ball_on_stick_controller",
|
||||
.bindings = mnd_ball_on_stick_controller_bindings,
|
||||
.num_bindings = ARRAY_SIZE(mnd_ball_on_stick_controller_bindings),
|
||||
.path = "/interaction_profiles/mndx/ball_on_a_stick_controller",
|
||||
.bindings = mndx_ball_on_a_stick_controller_bindings,
|
||||
.num_bindings = ARRAY_SIZE(mndx_ball_on_a_stick_controller_bindings),
|
||||
},
|
||||
{
|
||||
.path = "/interaction_profiles/valve/index_controller",
|
||||
|
|
|
@ -112,6 +112,18 @@
|
|||
#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* XR_MNDX_ball_on_a_stick_controller
|
||||
*/
|
||||
#if defined(XR_MNDX_ball_on_a_stick_controller)
|
||||
#define OXR_HAVE_MNDX_ball_on_a_stick_controller
|
||||
#define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
|
||||
_(MNDX_ball_on_a_stick_controller, MNDX_BALL_ON_A_STICK_CONTROLLER)
|
||||
#else
|
||||
#define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_)
|
||||
#endif
|
||||
|
||||
// end of GENERATED per-extension defines - do not modify - used by scripts
|
||||
|
||||
/*!
|
||||
|
@ -143,5 +155,6 @@
|
|||
OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) \
|
||||
OXR_EXTENSION_SUPPORT_MND_headless(_) \
|
||||
OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \
|
||||
OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
|
||||
OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \
|
||||
OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_)
|
||||
// clang-format on
|
||||
|
|
|
@ -166,7 +166,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_controller", &inst->path_cache.mnd_ball_on_stick_controller);
|
||||
cache_path(log, inst, "/interaction_profiles/mndx/ball_on_a_stick_controller", &inst->path_cache.mndx_ball_on_a_stick_controller);
|
||||
// clang-format on
|
||||
|
||||
// fill in our application info - @todo - replicate all createInfo
|
||||
|
|
|
@ -1148,7 +1148,7 @@ struct oxr_instance
|
|||
XrPath oculus_go_controller;
|
||||
XrPath oculus_touch_controller;
|
||||
XrPath valve_index_controller;
|
||||
XrPath mnd_ball_on_stick_controller;
|
||||
XrPath mndx_ball_on_a_stick_controller;
|
||||
} path_cache;
|
||||
|
||||
//! Debug messengers
|
||||
|
|
Loading…
Reference in a new issue