Fix bug found by Cain with his patch - thank you!

This commit is contained in:
Zach Fox 2017-06-15 19:07:10 -07:00
parent 749dede8b3
commit e2c6993ae9

View file

@ -336,11 +336,11 @@
var controllerMapping;
var controllerType = "Other";
function registerButtonMappings() {
var controllersDeviceNames = Controller.getDeviceNames();
if (controllersDeviceNames.indexOf("OculusTouch") !== -1) {
controllerType = "OculusTouch";
} else if (controllerDeviceNames.indexOf("Vive") !== -1) {
var VRDevices = Controller.getDeviceNames().toString();
if (VRDevices.includes("Vive")) {
controllerType = "Vive";
} else if (VRDevices.includes("OculusTouch")) {
controllerType = "OculusTouch";
}
controllerMappingName = 'Hifi-SpectatorCamera-Mapping-' + Math.random();