From 3579bb46ab5a91e52bcc0eae87f9adda5fd98c4d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 10 Mar 2015 17:04:30 -0700 Subject: [PATCH] handle touch update without a touch begin event --- examples/lookWithTouch.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/lookWithTouch.js b/examples/lookWithTouch.js index 68b29c305b..e9e7b0735a 100644 --- a/examples/lookWithTouch.js +++ b/examples/lookWithTouch.js @@ -38,6 +38,13 @@ function touchUpdateEvent(event) { if (wantDebugging) { print("touchUpdateEvent event.x,y=" + event.x + ", " + event.y); } + + if (!startedTouching) { + // handle Qt 5.4.x bug where we get touch update without a touch begin event + startedTouching = true; + lastX = event.x; + lastY = event.y; + } var MOUSE_YAW_SCALE = -0.25; var MOUSE_PITCH_SCALE = -12.5;