From 32ddabb11c0f5eca880fae53f966feb9b13a40d3 Mon Sep 17 00:00:00 2001 From: Sapphire Date: Wed, 11 Mar 2026 11:01:59 -0500 Subject: [PATCH] Add 'compatibility mode' option to use VIVE tracker input profile SteamVR only exposes trackers through XR_HTCX_vive_tracker_interaction when their Prop_ControllerType_String is `vive_tracker_[role]`, but if we set that in our input profile unconditionally, it will bring back the 'no bindings' popup on Vive Tracker (Chest) for everyone, so just add an option gated behind 'Advanced Settings' to use the VIVE tracker profile. --- .../resources/settings/default.vrsettings | 5 +++++ .../settings/settingsschema.vrsettings | 17 +++++++++++++++++ src/TrackerDevice.cpp | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 driver/slimevr/resources/settings/default.vrsettings create mode 100644 driver/slimevr/resources/settings/settingsschema.vrsettings diff --git a/driver/slimevr/resources/settings/default.vrsettings b/driver/slimevr/resources/settings/default.vrsettings new file mode 100644 index 00000000..f0a492d4 --- /dev/null +++ b/driver/slimevr/resources/settings/default.vrsettings @@ -0,0 +1,5 @@ +{ + "driver_slimevr": { + "emulateVives": false + } +} \ No newline at end of file diff --git a/driver/slimevr/resources/settings/settingsschema.vrsettings b/driver/slimevr/resources/settings/settingsschema.vrsettings new file mode 100644 index 00000000..11ccfadd --- /dev/null +++ b/driver/slimevr/resources/settings/settingsschema.vrsettings @@ -0,0 +1,17 @@ +[ + { + "title": "SlimeVR", + "show_without_hmd": true, + "values": [ + { + "name": "/settings/driver_slimevr/emulateVives", + "control": "toggle", + "label": "Compatibility Mode", + "on_label": "Enabled", + "off_label": "Disabled", + "advanced_only": true, + "requires_restart": true + } + ] + } +] \ No newline at end of file diff --git a/src/TrackerDevice.cpp b/src/TrackerDevice.cpp index 5efa6911..f8b1033f 100644 --- a/src/TrackerDevice.cpp +++ b/src/TrackerDevice.cpp @@ -162,7 +162,9 @@ vr::EVRInitError SlimeVRDriver::TrackerDevice::Activate(uint32_t unObjectId) { // Some device properties will be derived at runtime by SteamVR // using the profile, such as the device class and controller type - GetDriver()->GetProperties()->SetStringProperty(props, vr::Prop_InputProfilePath_String, "{slimevr}/input/slimevr_tracker_profile.json"); + bool emulate_vives = vr::VRSettings()->GetBool("driver_slimevr", "emulateVives"); + std::string input_profile_path = emulate_vives ? "{htc}/input/vive_tracker_profile.json" : "{slimevr}/input/slimevr_tracker_profile.json"; + GetDriver()->GetProperties()->SetStringProperty(props, vr::Prop_InputProfilePath_String, input_profile_path.c_str()); // Doesn't apply until restart of SteamVR auto role = GetViveRole(tracker_role_);