From 2b38c07aab1440bf612c884fb84ffc60b82d31f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Tue, 13 Oct 2020 02:50:53 +0200 Subject: [PATCH 1/2] Add Valve Index to calibratable devices --- interface/resources/qml/hifi/tablet/ControllerSettings.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/ControllerSettings.qml b/interface/resources/qml/hifi/tablet/ControllerSettings.qml index ea694ae2d7..9f0d92b699 100644 --- a/interface/resources/qml/hifi/tablet/ControllerSettings.qml +++ b/interface/resources/qml/hifi/tablet/ControllerSettings.qml @@ -244,7 +244,7 @@ Item { source: InputConfiguration.configurationLayout(box.textAt(box.currentIndex)); onLoaded: { if (loader.item.hasOwnProperty("pluginName")) { - if (box.textAt(box.currentIndex) === "HTC Vive") { + if (box.textAt(box.currentIndex) === "HTC Vive" || box.textAt(box.currentIndex) === "Valve Index" || box.textAt(box.currentIndex) === "Valve HMD" || box.textAt(box.currentIndex) === "Valve") { loader.item.pluginName = "OpenVR"; } else { loader.item.pluginName = box.textAt(box.currentIndex); @@ -298,7 +298,7 @@ Item { loader.source = ""; var selectedDevice = box.textAt(box.currentIndex); var source = ""; - if (selectedDevice == "HTC Vive") { + if (selectedDevice == "HTC Vive" || selectedDevice == "Valve Index" || selectedDevice == "Valve HMD" || selectedDevice == "Valve") { source = InputConfiguration.configurationLayout("OpenVR"); } else { source = InputConfiguration.configurationLayout(selectedDevice); From 1a3f97bdc8d5efd23966082e3572394e61627257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Tue, 13 Oct 2020 18:33:15 +0200 Subject: [PATCH 2/2] Change to Davids suggestion --- interface/resources/qml/hifi/tablet/ControllerSettings.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/ControllerSettings.qml b/interface/resources/qml/hifi/tablet/ControllerSettings.qml index 9f0d92b699..d6c04ab420 100644 --- a/interface/resources/qml/hifi/tablet/ControllerSettings.qml +++ b/interface/resources/qml/hifi/tablet/ControllerSettings.qml @@ -27,6 +27,7 @@ Item { width: parent.width property string title: "Controls" + property var openVRDevices: ["HTC Vive", "Valve Index", "Valve HMD", "Valve"] HifiConstants { id: hifi } @@ -244,7 +245,7 @@ Item { source: InputConfiguration.configurationLayout(box.textAt(box.currentIndex)); onLoaded: { if (loader.item.hasOwnProperty("pluginName")) { - if (box.textAt(box.currentIndex) === "HTC Vive" || box.textAt(box.currentIndex) === "Valve Index" || box.textAt(box.currentIndex) === "Valve HMD" || box.textAt(box.currentIndex) === "Valve") { + if (openVRDevices.indexOf(box.textAt(box.currentIndex)) !== -1) { loader.item.pluginName = "OpenVR"; } else { loader.item.pluginName = box.textAt(box.currentIndex); @@ -298,7 +299,7 @@ Item { loader.source = ""; var selectedDevice = box.textAt(box.currentIndex); var source = ""; - if (selectedDevice == "HTC Vive" || selectedDevice == "Valve Index" || selectedDevice == "Valve HMD" || selectedDevice == "Valve") { + if (openVRDevices.indexOf(selectedDevice) !== -1) { source = InputConfiguration.configurationLayout("OpenVR"); } else { source = InputConfiguration.configurationLayout(selectedDevice);