File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,12 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
322322 iron_internal_mouse_trigger_move (x, y);
323323 }
324324 iron_internal_surface_trigger_move (index, x, y);
325+ if (touch.type == UITouchTypePencil) {
326+ if (!(touch.estimatedProperties & UITouchPropertyForce)) {
327+ // usb-c pencil with no pressure
328+ iron_internal_pen_trigger_move (x, y, touch.force );
329+ }
330+ }
325331 }
326332 }
327333}
@@ -332,6 +338,7 @@ - (void)touchesEstimatedPropertiesUpdated:(NSSet<UITouch *> *)touches {
332338 CGPoint point = [touch locationInView: self ];
333339 float x = point.x * self.contentScaleFactor ;
334340 float y = point.y * self.contentScaleFactor ;
341+ // pencil with pressure
335342 iron_internal_pen_trigger_move (x, y, touch.force );
336343 }
337344 }
You can’t perform that action at this time.
0 commit comments