Adding solarxr patches
Remove potential statistics
This commit is contained in:
@@ -16,6 +16,7 @@ set(XRT_BUILD_DRIVER_RIFT_S OFF)
|
||||
set(XRT_BUILD_DRIVER_ROKID OFF)
|
||||
set(XRT_BUILD_DRIVER_SIMULATED OFF)
|
||||
set(XRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE ${WIVRN_FEATURE_STEAMVR_LIGHTHOUSE})
|
||||
set(XRT_BUILD_DRIVER_SOLARXR ${WIVRN_FEATURE_SOLARXR})
|
||||
set(XRT_BUILD_DRIVER_TWRAP OFF)
|
||||
set(XRT_BUILD_DRIVER_VF OFF)
|
||||
set(XRT_BUILD_DRIVER_VIVE OFF)
|
||||
|
||||
@@ -42,13 +42,6 @@ class wivrn_hmd : public xrt_device
|
||||
.name = XRT_INPUT_GENERIC_HEAD_POSE,
|
||||
};
|
||||
xrt_hmd_parts hmd_parts{};
|
||||
xrt_tracking_origin tracking_origin{
|
||||
.name = "WiVRn origin",
|
||||
.type = XRT_TRACKING_TYPE_OTHER,
|
||||
.initial_offset = {
|
||||
.orientation = {0, 0, 0, 1},
|
||||
},
|
||||
};
|
||||
|
||||
view_list views;
|
||||
from_headset::battery battery{};
|
||||
@@ -66,6 +59,15 @@ class wivrn_hmd : public xrt_device
|
||||
|
||||
public:
|
||||
using base = xrt_device;
|
||||
|
||||
xrt_tracking_origin tracking_origin{
|
||||
.name = "WiVRn origin",
|
||||
.type = XRT_TRACKING_TYPE_OTHER,
|
||||
.initial_offset = {
|
||||
.orientation = {0, 0, 0, 1},
|
||||
},
|
||||
};
|
||||
|
||||
wivrn_hmd(wivrn::wivrn_session * cnx,
|
||||
const from_headset::headset_info_packet & info);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
#if WIVRN_FEATURE_SOLARXR
|
||||
#include "solarxr_device.h"
|
||||
#include "solarxr_interface.h"
|
||||
#endif
|
||||
|
||||
namespace wivrn
|
||||
@@ -269,15 +269,13 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
|
||||
}
|
||||
|
||||
#if WIVRN_FEATURE_SOLARXR
|
||||
xrt_device * solar_devs[XRT_SYSTEM_MAX_DEVICES];
|
||||
uint32_t solar_devs_cap = XRT_SYSTEM_MAX_DEVICES - xdev_count;
|
||||
uint32_t num_devs = solarxr_device_create_xdevs(&hmd, solar_devs, XRT_SYSTEM_MAX_DEVICES - xdev_count);
|
||||
for (int i = 0; i < num_devs; i++)
|
||||
uint32_t num_devs = solarxr_device_create_xdevs(&hmd.tracking_origin, &xdevs[xdev_count], ARRAY_SIZE(xdevs) - xdev_count);
|
||||
if (num_devs != 0)
|
||||
{
|
||||
xdevs[xdev_count++] = solar_devs[i];
|
||||
if (i == 0)
|
||||
static_roles.body = solar_devs[i];
|
||||
static_roles.body = xdevs[xdev_count];
|
||||
solarxr_device_set_feeder_devices(static_roles.body, xdevs, xdev_count);
|
||||
}
|
||||
xdev_count += num_devs;
|
||||
#endif
|
||||
|
||||
if (roles.left >= 0)
|
||||
@@ -296,6 +294,10 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
|
||||
|
||||
wivrn_session::~wivrn_session()
|
||||
{
|
||||
#if WIVRN_FEATURE_SOLARXR
|
||||
solarxr_device_set_feeder_devices(static_roles.body, nullptr, 0);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(xdevs); i++)
|
||||
{
|
||||
xrt_device_destroy(&xdevs[i]);
|
||||
|
||||
Reference in New Issue
Block a user