Fix call to ipc_server_main, add config options for debug GUI and steamvr_lh

* Add config option for SteamVR lighthouse device support

* Add dashboard toggles for debug window and steamvr_lh

* clang-format

* Hide advanced toggles if not enabled during build
This commit is contained in:
Sapphire
2025-05-21 04:58:06 -05:00
parent bc7d0ad6e0
commit b29abf073e
8 changed files with 101 additions and 7 deletions
+6
View File
@@ -140,6 +140,12 @@ configuration configuration::read_user_configuration()
}
}
if (auto it = json.find("debug-gui"); it != json.end())
result.debug_gui = *it;
if (auto it = json.find("use-steamvr-lh"); it != json.end())
result.use_steamvr_lh = *it;
if (auto it = json.find("tcp-only"); it != json.end())
result.tcp_only = *it;
else if (auto it = json.find("tcp_only"); it != json.end())
+2
View File
@@ -59,6 +59,8 @@ struct configuration
std::optional<std::array<double, 2>> scale;
std::optional<std::array<float, 3>> grip_surface;
std::vector<std::string> application;
bool debug_gui = false;
bool use_steamvr_lh = false;
bool tcp_only = false;
service_publication publication = service_publication::avahi;
+2 -1
View File
@@ -20,6 +20,7 @@
#include "wivrn_session.h"
#include "accept_connection.h"
#include "configuration.h"
#include "driver/app_pacer.h"
#include "main/comp_compositor.h"
#include "main/comp_main_interface.h"
@@ -169,7 +170,7 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
static_roles.hand_tracking.right = xdevs[xdev_count++] = &right_hand;
#if WIVRN_FEATURE_STEAMVR_LIGHTHOUSE
auto use_steamvr_lh = std::getenv("WIVRN_USE_STEAMVR_LH");
auto use_steamvr_lh = configuration::read_user_configuration().use_steamvr_lh || std::getenv("WIVRN_USE_STEAMVR_LH");
xrt_system_devices * lhdevs = NULL;
if (use_steamvr_lh && steamvr_lh_create_devices(&lhdevs) == XRT_SUCCESS)