From 9a9081b0d4f1a49c7bf6fee6f0b1c273dfeedf76 Mon Sep 17 00:00:00 2001 From: PerfectionCSGO Date: Mon, 28 Dec 2015 15:24:24 +0100 Subject: [PATCH] Camera tapping fix --- src/windows/CameraProxy.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/windows/CameraProxy.js b/src/windows/CameraProxy.js index da8cf7d..e45ec9d 100644 --- a/src/windows/CameraProxy.js +++ b/src/windows/CameraProxy.js @@ -381,11 +381,16 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) { if (FocusControl.supported === true) { capturePreview.addEventListener('click', function () { - + // Make sure user can't click more than once + if (this.getAttribute('clicked') === '1') { + return false; + } else { + this.setAttribute('clicked', '1'); + } var preset = Windows.Media.Devices.FocusPreset.autoNormal; - + var parent = this; FocusControl.setPresetAsync(preset).done(function () { - + parent.setAttribute('clicked', '0'); }); }); }