[vlc-commits] vout_ios2: fix touch event propagation on retina displays

Felix Paul Kühne git at videolan.org
Wed May 28 20:41:06 CEST 2014


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed May 28 20:34:11 2014 +0200| [29a6c1e1215eb606fddd38ddc3c6f566e2b1b60b] | committer: Felix Paul Kühne

vout_ios2: fix touch event propagation on retina displays

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29a6c1e1215eb606fddd38ddc3c6f566e2b1b60b
---

 modules/video_output/ios2.m |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index 6939d2e..5525112 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -511,8 +511,9 @@ static void OpenglESSwap(vlc_gl_t *gl)
 {
     UIGestureRecognizerState state = [tapRecognizer state];
     CGPoint touchPoint = [tapRecognizer locationInView:self];
+    CGFloat scaleFactor = self.contentScaleFactor;
     vout_display_SendMouseMovedDisplayCoordinates(_voutDisplay, ORIENT_NORMAL,
-                                                  (int)touchPoint.x, (int)touchPoint.y,
+                                                  (int)touchPoint.x * scaleFactor, (int)touchPoint.y * scaleFactor,
                                                   &_voutDisplay->sys->place);
 
     vout_display_SendEventMousePressed(_voutDisplay, MOUSE_BUTTON_LEFT);



More information about the vlc-commits mailing list