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:
@@ -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())
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user