From 4ee3f4b661bdac6027df922195b0f65051b81e58 Mon Sep 17 00:00:00 2001 From: George Leman <gleman@mailgun.com> Date: Thu, 7 Jul 2022 18:44:24 -0400 Subject: [PATCH] Use nativeScale to calculate touch location on IOS --- internal/driver/mobile/app/darwin_ios.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/driver/mobile/app/darwin_ios.m b/internal/driver/mobile/app/darwin_ios.m index 4c34db92d4..6cce1d07a3 100644 --- a/internal/driver/mobile/app/darwin_ios.m +++ b/internal/driver/mobile/app/darwin_ios.m @@ -167,7 +167,7 @@ - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect { #define TOUCH_TYPE_END 2 // touch.TypeEnd static void sendTouches(int change, NSSet* touches) { - CGFloat scale = [UIScreen mainScreen].scale; + CGFloat scale = [UIScreen mainScreen].nativeScale; for (UITouch* touch in touches) { CGPoint p = [touch locationInView:touch.view]; sendTouch((GoUintptr)touch, (GoUintptr)change, p.x*scale, p.y*scale);