mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:36:57 +02:00
Cleanup
This commit is contained in:
parent
4a74522884
commit
5823efce76
1 changed files with 5 additions and 4 deletions
|
@ -329,7 +329,6 @@
|
||||||
var controllerMapping;
|
var controllerMapping;
|
||||||
var controllerType = "Other";
|
var controllerType = "Other";
|
||||||
function registerButtonMappings() {
|
function registerButtonMappings() {
|
||||||
|
|
||||||
var VRDevices = Controller.getDeviceNames().toString();
|
var VRDevices = Controller.getDeviceNames().toString();
|
||||||
if (VRDevices) {
|
if (VRDevices) {
|
||||||
if (VRDevices.includes("Vive")) {
|
if (VRDevices.includes("Vive")) {
|
||||||
|
@ -337,6 +336,7 @@
|
||||||
} else if (VRDevices.includes("OculusTouch")) {
|
} else if (VRDevices.includes("OculusTouch")) {
|
||||||
controllerType = "OculusTouch";
|
controllerType = "OculusTouch";
|
||||||
} else {
|
} else {
|
||||||
|
sendToQml({ method: 'updateControllerMappingCheckbox', setting: switchViewFromController, controller: controllerType });
|
||||||
return; // Neither Vive nor Touch detected
|
return; // Neither Vive nor Touch detected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -384,12 +384,13 @@
|
||||||
tablet.loadQMLSource(SPECTATOR_CAMERA_QML_SOURCE);
|
tablet.loadQMLSource(SPECTATOR_CAMERA_QML_SOURCE);
|
||||||
sendToQml({ method: 'updateSpectatorCameraCheckbox', params: !!camera });
|
sendToQml({ method: 'updateSpectatorCameraCheckbox', params: !!camera });
|
||||||
sendToQml({ method: 'updateMonitorShowsSwitch', params: monitorShowsCameraView });
|
sendToQml({ method: 'updateMonitorShowsSwitch', params: monitorShowsCameraView });
|
||||||
sendToQml({ method: 'updateControllerMappingCheckbox', setting: switchViewFromController, controller: controllerType });
|
|
||||||
Menu.setIsOptionChecked("Disable Preview", false);
|
|
||||||
Menu.setIsOptionChecked("Mono Preview", true);
|
|
||||||
if (!controllerMapping) {
|
if (!controllerMapping) {
|
||||||
registerButtonMappings();
|
registerButtonMappings();
|
||||||
|
} else {
|
||||||
|
sendToQml({ method: 'updateControllerMappingCheckbox', setting: switchViewFromController, controller: controllerType });
|
||||||
}
|
}
|
||||||
|
Menu.setIsOptionChecked("Disable Preview", false);
|
||||||
|
Menu.setIsOptionChecked("Mono Preview", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue