Skip to content

Commit

Permalink
Merge pull request #3127 from cedy/fix/3122
Browse files Browse the repository at this point in the history
fix: Use nativeScale to calculate touch location on IOS
  • Loading branch information
andydotxyz authored Jul 10, 2022
2 parents 1613e93 + 4ee3f4b commit 5b79162
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/driver/mobile/app/darwin_ios.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5b79162

Please sign in to comment.