From b337800146e6d5c720e51d9d309e7dcec6263513 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Fri, 21 Feb 2025 11:42:59 +0100 Subject: [PATCH] Set wivrn hmd as last xdev This fixes an issue when other devices are detected as HMD, for instance with the lighthouse driver. --- server/driver/wivrn_session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/driver/wivrn_session.cpp b/server/driver/wivrn_session.cpp index fab44d40..18bd356e 100644 --- a/server/driver/wivrn_session.cpp +++ b/server/driver/wivrn_session.cpp @@ -155,8 +155,6 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr connection throw; } - static_roles.head = xdevs[xdev_count++] = &hmd; - if (hmd.face_tracking_supported) static_roles.face = &hmd; @@ -227,6 +225,8 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr connection } #endif + static_roles.head = xdevs[xdev_count++] = &hmd; + if (roles.left >= 0) roles.left_profile = xdevs[roles.left]->name; if (roles.right >= 0)