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_);