This commit is contained in:
Zach Fox 2017-07-12 15:17:23 -07:00
parent d37789234d
commit e6f7457d0c

View file

@ -157,7 +157,7 @@
if ((isHMDMode || showSpectatorInDesktop) && !isShuttingDown) { if ((isHMDMode || showSpectatorInDesktop) && !isShuttingDown) {
button = tablet.addButton({ button = tablet.addButton({
text: buttonName, text: buttonName,
icon: Script.resourcesPath() + "icons/tablet-icons/spectator-i.svg" icon: "icons/tablet-icons/spectator-i.svg"
}); });
button.clicked.connect(onTabletButtonClicked); button.clicked.connect(onTabletButtonClicked);
} }
@ -344,9 +344,9 @@
function registerButtonMappings() { function registerButtonMappings() {
var VRDevices = Controller.getDeviceNames().toString(); var VRDevices = Controller.getDeviceNames().toString();
if (VRDevices) { if (VRDevices) {
if (VRDevices.includes("Vive")) { if (VRDevices.indexOf("Vive") != -1) {
controllerType = "Vive"; controllerType = "Vive";
} else if (VRDevices.includes("OculusTouch")) { } else if (VRDevices.indexOf("OculusTouch") != -1) {
controllerType = "OculusTouch"; controllerType = "OculusTouch";
} else { } else {
sendToQml({ method: 'updateControllerMappingCheckbox', setting: switchViewFromController, controller: controllerType }); sendToQml({ method: 'updateControllerMappingCheckbox', setting: switchViewFromController, controller: controllerType });