Forward session state to server

Closes #395
This commit is contained in:
Sapphire
2025-07-05 15:41:22 +02:00
committed by xytovl
parent 8e2719ff30
commit 5bfc9ed942
6 changed files with 90 additions and 12 deletions
+5 -1
View File
@@ -218,7 +218,6 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
info.hand_tracking = config.check_feature(feature::hand_tracking);
info.eye_gaze = config.check_feature(feature::eye_gaze);
info.presence = self->instance.has_extension(XR_EXT_USER_PRESENCE_EXTENSION_NAME) && self->system.user_presence_properties().supportsUserPresence;
if (config.check_feature(feature::face_tracking))
{
@@ -1289,6 +1288,11 @@ void scenes::stream::on_xr_event(const xr::event & event)
.view_index = uint8_t(event.visibility_mask_changed.viewIndex),
});
break;
case XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED:
network_session->send_control(from_headset::session_state_changed{
.state = event.state_changed.state,
});
break;
case XR_TYPE_EVENT_DATA_USER_PRESENCE_CHANGED_EXT:
network_session->send_control(from_headset::user_presence_changed{
.present = (bool)event.user_presence_changed.isUserPresent,