From 502ce8f04fe878208e8b0326887ebfcf5cd30783 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 30 Apr 2018 16:12:04 -0700 Subject: [PATCH] More bugfixes --- .../marketplace/spectator-camera/spectatorCamera.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js b/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js index 56a946c682..507527b6aa 100644 --- a/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js +++ b/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js @@ -240,7 +240,6 @@ // 3. Camera is on; "Monitor Shows" is "HMD Preview": "url" is "" // 4. Camera is on; "Monitor Shows" is "Camera View": "url" is "resource://spectatorCameraFrame" function setDisplay(showCameraView) { - var url = (camera) ? (showCameraView ? "resource://spectatorCameraFrame" : "resource://hmdPreviewFrame") : ""; // FIXME: temporary hack to avoid setting the display texture to hmdPreviewFrame @@ -255,9 +254,6 @@ var monitorShowsCameraView = !!Settings.getValue('spectatorCamera/monitorShowsCameraView', MONITOR_SHOWS_CAMERA_VIEW_DEFAULT); function setMonitorShowsCameraView(showCameraView) { setDisplay(showCameraView); - if (showCameraView === monitorShowsCameraView) { - return; - } monitorShowsCameraView = showCameraView; Settings.setValue('spectatorCamera/monitorShowsCameraView', showCameraView); } @@ -588,9 +584,10 @@ if (!switchViewControllerMapping || !takeSnapshotControllerMapping) { registerButtonMappings(); } - setDisplay(monitorShowsCameraView); if (!isHMDMode) { - spectatorCameraOff(); + setMonitorShowsCameraView(false); + } else { + setDisplay(monitorShowsCameraView); } }