Set wivrn hmd as last xdev

This fixes an issue when other devices are detected as HMD, for instance
with the lighthouse driver.
This commit is contained in:
Patrick Nicolas
2025-02-21 11:57:02 +01:00
parent 8495a9433c
commit b337800146
+2 -2
View File
@@ -155,8 +155,6 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> 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<wivrn_connection> connection
}
#endif
static_roles.head = xdevs[xdev_count++] = &hmd;
if (roles.left >= 0)
roles.left_profile = xdevs[roles.left]->name;
if (roles.right >= 0)