From 202ef4189478be4122bbe677f9f2c16aa318c000 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 23 Jul 2023 01:13:54 -0500 Subject: [PATCH] Fix scaling of touch coordinates --- app/streaming/input/abstouch.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/app/streaming/input/abstouch.cpp b/app/streaming/input/abstouch.cpp index dc1bf75e..75e76d88 100644 --- a/app/streaming/input/abstouch.cpp +++ b/app/streaming/input/abstouch.cpp @@ -78,6 +78,7 @@ void SdlInputHandler::handleAbsoluteFingerEvent(SDL_TouchFingerEvent* event) dst.h = windowHeight; // Scale window-relative events to be video-relative and clamp to video region + StreamUtils::scaleSourceToDestinationSurface(&src, &dst); float vidrelx = qMin(qMax((int)(event->x * windowWidth), dst.x), dst.x + dst.w) - dst.x; float vidrely = qMin(qMax((int)(event->y * windowHeight), dst.y), dst.y + dst.h) - dst.y;