This commit is contained in:
Just some guy
2025-09-25 17:01:37 +00:00
committed by GitHub
12 changed files with 37 additions and 16 deletions
+4
View File
@@ -251,6 +251,10 @@ if(ANDROID)
COMMAND ${TOKTX} --encode astc --astc_blk_d 12x12 --astc_quality 100 --genmipmap ${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2 ${AST_SRC_DIR}/WoodFloor051_1K-JPG_Color.jpg
DEPENDS ${AST_SRC_DIR}/WoodFloor051_1K-JPG_Color.jpg)
add_custom_command(OUTPUT ${ASSETS_DIR}/default_icon.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn.ktx2 ${ASSETS_DIR}/default_icon.png
DEPENDS ${ASSETS_DIR}/default_icon.png)
add_custom_command(OUTPUT ${ASSETS_DIR}/vr_splash.png
COMMAND ${CMAKE_COMMAND} -E copy ${ASSETS_DIR}/wivrn.png ${ASSETS_DIR}/vr_splash.png
DEPENDS ${ASSETS_DIR}/wivrn.png)
+1
View File
@@ -33,6 +33,7 @@ set(XRT_FEATURE_WINDOW_PEEK OFF)
set(XRT_FEATURE_OPENXR_ACTIVE_ACTION_SET_PRIORITY ON)
set(XRT_FEATURE_RENDERDOC ${WIVRN_FEATURE_RENDERDOC})
set(XRT_FEATURE_OPENXR_BODY_TRACKING_FB ON)
set(XRT_FEATURE_OPENXR_FACE_TRACKING2_FB ON)
set(XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC ON)
set(XRT_FEATURE_OPENXR_HAND_TRACKING_EXT ON)
+1 -1
View File
@@ -57,7 +57,7 @@ std::filesystem::path active_runtime::openvr_compat_path()
std::optional<std::filesystem::path> flatpak_root = flatpak_key(flatpak::section::instance, "app-path");
// flatpak default
if (flatpak_root)
return *flatpak_root / "xrizer";
return *flatpak_root / "OpenComposite";
for (auto path: std::ranges::split_view(std::string_view(OVR_COMPAT_SEARCH_PATH), std::string_view(":")))
{
+2
View File
@@ -533,6 +533,8 @@ wivrn_controller::wivrn_controller(int hand_id,
inputs_array(input_count, xrt_input{}),
cnx(cnx)
{
xrt_device_init(static_cast<xrt_device *>(this));
inputs = inputs_array.data();
// Setup input.
+1
View File
@@ -57,6 +57,7 @@ wivrn_eye_tracker::wivrn_eye_tracker(xrt_device * hmd) :
},
gaze(device_id::EYE_GAZE)
{
xrt_device_init(static_cast<xrt_device *>(this));
}
xrt_result_t wivrn_eye_tracker::update_inputs()
+1
View File
@@ -60,6 +60,7 @@ wivrn_fb_face2_tracker::wivrn_fb_face2_tracker(xrt_device * hmd,
},
cnx(cnx)
{
xrt_device_init(static_cast<xrt_device *>(this));
}
xrt_result_t wivrn_fb_face2_tracker::update_inputs()
+2
View File
@@ -124,6 +124,8 @@ wivrn_generic_tracker::wivrn_generic_tracker(int index, xrt_device * hmd, wivrn_
cnx(cnx),
index(index)
{
xrt_device_init(static_cast<xrt_device *>(this));
auto unique_name = std::format("WiVRn Generic Tracker #{}", index + 1);
strlcpy(str, unique_name.c_str(), std::size(str));
auto unique_serial = std::format("wivrn-{}", index + 1);
+2
View File
@@ -198,6 +198,8 @@ wivrn_hand_interaction::wivrn_hand_interaction(int hand_id,
inputs_array(input_count, xrt_input{}),
cnx(cnx)
{
xrt_device_init(static_cast<xrt_device *>(this));
inputs = inputs_array.data();
// Setup input.
+2
View File
@@ -88,6 +88,8 @@ wivrn_hmd::wivrn_hmd(wivrn::wivrn_session * cnx,
},
cnx(cnx)
{
xrt_device_init(static_cast<xrt_device *>(this));
const auto config = configuration();
auto eye_width = info.recommended_eye_width;
+9 -7
View File
@@ -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);
+2
View File
@@ -66,6 +66,8 @@ wivrn_htc_face_tracker::wivrn_htc_face_tracker(xrt_device * hmd,
},
cnx(cnx)
{
xrt_device_init(static_cast<xrt_device *>(this));
inputs = inputs_array.data();
input_count = inputs_array.size();
}
+10 -8
View File
@@ -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]);