diff --git a/src/xrt/compositor/multi/comp_multi_system.c b/src/xrt/compositor/multi/comp_multi_system.c index 8dc4106eb..5283e71d5 100644 --- a/src/xrt/compositor/multi/comp_multi_system.c +++ b/src/xrt/compositor/multi/comp_multi_system.c @@ -1,10 +1,11 @@ -// Copyright 2019-2022, Collabora, Ltd. +// Copyright 2019-2023, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file * @brief Multi client wrapper compositor. * @author Pete Black * @author Jakob Bornecrantz + * @author Korcan Hussein * @ingroup comp_multi */ @@ -371,6 +372,7 @@ update_session_state_locked(struct multi_system_compositor *msc) const struct xrt_begin_session_info begin_session_info = { .view_type = XRT_VIEW_TYPE_STEREO, .ext_hand_tracking_enabled = false, + .ext_eye_gaze_interaction_enabled = false, }; switch (msc->sessions.state) { diff --git a/src/xrt/include/xrt/xrt_compositor.h b/src/xrt/include/xrt/xrt_compositor.h index f4c14eed0..193801e15 100644 --- a/src/xrt/include/xrt/xrt_compositor.h +++ b/src/xrt/include/xrt/xrt_compositor.h @@ -861,6 +861,7 @@ struct xrt_begin_session_info { enum xrt_view_type view_type; bool ext_hand_tracking_enabled; + bool ext_eye_gaze_interaction_enabled; }; /*! diff --git a/src/xrt/include/xrt/xrt_instance.h b/src/xrt/include/xrt/xrt_instance.h index b2950fe2c..12e261286 100644 --- a/src/xrt/include/xrt/xrt_instance.h +++ b/src/xrt/include/xrt/xrt_instance.h @@ -4,6 +4,7 @@ * @file * @brief Header for @ref xrt_instance object. * @author Jakob Bornecrantz + * @author Korcan Hussein * @ingroup xrt_iface */ @@ -39,6 +40,7 @@ struct xrt_instance_info { char application_name[XRT_MAX_APPLICATION_NAME_SIZE]; bool ext_hand_tracking_enabled; + bool ext_eye_gaze_interaction_enabled; }; /*! diff --git a/src/xrt/ipc/server/ipc_server_handler.c b/src/xrt/ipc/server/ipc_server_handler.c index 43cf436a6..7515d5244 100644 --- a/src/xrt/ipc/server/ipc_server_handler.c +++ b/src/xrt/ipc/server/ipc_server_handler.c @@ -214,6 +214,7 @@ ipc_handle_session_begin(volatile struct ipc_client_state *ics) const struct xrt_begin_session_info begin_session_info = { .view_type = XRT_VIEW_TYPE_STEREO, .ext_hand_tracking_enabled = ics->client_state.info.ext_hand_tracking_enabled, + .ext_eye_gaze_interaction_enabled = ics->client_state.info.ext_eye_gaze_interaction_enabled, }; return xrt_comp_begin_session(ics->xc, &begin_session_info); diff --git a/src/xrt/state_trackers/oxr/oxr_instance.c b/src/xrt/state_trackers/oxr/oxr_instance.c index b055b5854..004de6d49 100644 --- a/src/xrt/state_trackers/oxr/oxr_instance.c +++ b/src/xrt/state_trackers/oxr/oxr_instance.c @@ -4,6 +4,7 @@ * @file * @brief Holds instance related functions. * @author Jakob Bornecrantz + * @author Korcan Hussein * @ingroup oxr_main */ @@ -245,10 +246,12 @@ oxr_instance_create(struct oxr_logger *log, // fill in our application info - @todo - replicate all createInfo // fields? - struct xrt_instance_info i_info = {0}; + struct xrt_instance_info i_info = { + .ext_hand_tracking_enabled = extensions->EXT_hand_tracking, + .ext_eye_gaze_interaction_enabled = extensions->EXT_eye_gaze_interaction, + }; snprintf(i_info.application_name, sizeof(inst->xinst->instance_info.application_name), "%s", createInfo->applicationInfo.applicationName); - i_info.ext_hand_tracking_enabled = extensions->EXT_hand_tracking; #ifdef XRT_OS_ANDROID XrInstanceCreateInfoAndroidKHR const *create_info_android = OXR_GET_INPUT_FROM_CHAIN( diff --git a/src/xrt/state_trackers/oxr/oxr_session.c b/src/xrt/state_trackers/oxr/oxr_session.c index 7ba14c157..fc254678a 100644 --- a/src/xrt/state_trackers/oxr/oxr_session.c +++ b/src/xrt/state_trackers/oxr/oxr_session.c @@ -1,10 +1,11 @@ -// Copyright 2018-2022, Collabora, Ltd. +// Copyright 2018-2023, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file * @brief Holds session related functions. * @author Jakob Bornecrantz * @author Moses Turner + * @author Korcan Hussein * @ingroup oxr_main */ @@ -139,9 +140,12 @@ oxr_session_begin(struct oxr_logger *log, struct oxr_session *sess, const XrSess view_type); } + const struct oxr_extension_status *extensions = &sess->sys->inst->extensions; + const struct xrt_begin_session_info begin_session_info = { .view_type = (enum xrt_view_type)beginInfo->primaryViewConfigurationType, - .ext_hand_tracking_enabled = sess->sys->inst->extensions.EXT_hand_tracking, + .ext_hand_tracking_enabled = extensions->EXT_hand_tracking, + .ext_eye_gaze_interaction_enabled = extensions->EXT_eye_gaze_interaction, }; xrt_result_t xret = xrt_comp_begin_session(xc, &begin_session_info);