From ae54f9c80a981d1e0d25ad5ba7f040231b8931bb Mon Sep 17 00:00:00 2001 From: David Kelly Date: Mon, 22 May 2017 16:25:21 -0700 Subject: [PATCH 1/2] Should fix crash in general setting dialog --- plugins/openvr/src/ViveControllerManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openvr/src/ViveControllerManager.cpp b/plugins/openvr/src/ViveControllerManager.cpp index 3bda481243..2e4705d24b 100644 --- a/plugins/openvr/src/ViveControllerManager.cpp +++ b/plugins/openvr/src/ViveControllerManager.cpp @@ -163,12 +163,12 @@ void ViveControllerManager::pluginUpdate(float deltaTime, const controller::Inpu } ViveControllerManager::InputDevice::InputDevice(vr::IVRSystem*& system) : controller::InputDevice("Vive"), _system(system) { - createPreferences(); - _configStringMap[Config::Auto] = QString("Auto"); _configStringMap[Config::Feet] = QString("Feet"); _configStringMap[Config::FeetAndHips] = QString("FeetAndHips"); _configStringMap[Config::FeetHipsAndChest] = QString("FeetHipsAndChest"); + + createPreferences(); } void ViveControllerManager::InputDevice::update(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) { From 1c71d2e6b1808b74f775673f879ed339c88d8022 Mon Sep 17 00:00:00 2001 From: David Kelly Date: Tue, 23 May 2017 09:05:14 -0700 Subject: [PATCH 2/2] don't create prefs for pucks if vive not supported --- plugins/openvr/src/ViveControllerManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/openvr/src/ViveControllerManager.cpp b/plugins/openvr/src/ViveControllerManager.cpp index 2e4705d24b..fdc8231558 100644 --- a/plugins/openvr/src/ViveControllerManager.cpp +++ b/plugins/openvr/src/ViveControllerManager.cpp @@ -163,12 +163,15 @@ void ViveControllerManager::pluginUpdate(float deltaTime, const controller::Inpu } ViveControllerManager::InputDevice::InputDevice(vr::IVRSystem*& system) : controller::InputDevice("Vive"), _system(system) { + _configStringMap[Config::Auto] = QString("Auto"); _configStringMap[Config::Feet] = QString("Feet"); _configStringMap[Config::FeetAndHips] = QString("FeetAndHips"); _configStringMap[Config::FeetHipsAndChest] = QString("FeetHipsAndChest"); - createPreferences(); + if (openVrSupported()) { + createPreferences(); + } } void ViveControllerManager::InputDevice::update(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) {