Change to Davids suggestion
This commit is contained in:
parent
2b38c07aab
commit
1a3f97bdc8
@ -27,6 +27,7 @@ Item {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
property string title: "Controls"
|
property string title: "Controls"
|
||||||
|
property var openVRDevices: ["HTC Vive", "Valve Index", "Valve HMD", "Valve"]
|
||||||
|
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
@ -244,7 +245,7 @@ Item {
|
|||||||
source: InputConfiguration.configurationLayout(box.textAt(box.currentIndex));
|
source: InputConfiguration.configurationLayout(box.textAt(box.currentIndex));
|
||||||
onLoaded: {
|
onLoaded: {
|
||||||
if (loader.item.hasOwnProperty("pluginName")) {
|
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";
|
loader.item.pluginName = "OpenVR";
|
||||||
} else {
|
} else {
|
||||||
loader.item.pluginName = box.textAt(box.currentIndex);
|
loader.item.pluginName = box.textAt(box.currentIndex);
|
||||||
@ -298,7 +299,7 @@ Item {
|
|||||||
loader.source = "";
|
loader.source = "";
|
||||||
var selectedDevice = box.textAt(box.currentIndex);
|
var selectedDevice = box.textAt(box.currentIndex);
|
||||||
var source = "";
|
var source = "";
|
||||||
if (selectedDevice == "HTC Vive" || selectedDevice == "Valve Index" || selectedDevice == "Valve HMD" || selectedDevice == "Valve") {
|
if (openVRDevices.indexOf(selectedDevice) !== -1) {
|
||||||
source = InputConfiguration.configurationLayout("OpenVR");
|
source = InputConfiguration.configurationLayout("OpenVR");
|
||||||
} else {
|
} else {
|
||||||
source = InputConfiguration.configurationLayout(selectedDevice);
|
source = InputConfiguration.configurationLayout(selectedDevice);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user