[vlc-commits] vout ios: take scale factor into account when initializing the rendering

Felix Paul Kühne git at videolan.org
Mon Jul 6 18:00:32 CEST 2015


vlc/vlc-2.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Jul  6 17:47:17 2015 +0200| [166acd2b35ddf88e7827cc8d24aac1b5c1153976] | committer: Felix Paul Kühne

vout ios: take scale factor into account when initializing the rendering

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=166acd2b35ddf88e7827cc8d24aac1b5c1153976
---

 modules/video_output/ios2.m |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index feb18c4..1a1c1b9 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -205,9 +205,10 @@ static int Open(vlc_object_t *this)
     vd->control = Control;
 
     /* forward our dimensions to the vout core */
-    CGSize viewSize = sys->viewContainer.frame.size;
+    CGFloat scaleFactor = sys->viewContainer.contentScaleFactor;
+    CGSize viewSize = sys->viewContainer.bounds.size;
     vout_display_SendEventFullscreen(vd, false);
-    vout_display_SendEventDisplaySize(vd, (int)viewSize.width, (int)viewSize.height, false);
+    vout_display_SendEventDisplaySize(vd, viewSize.width * scaleFactor, viewSize.height * scaleFactor, false);
 
     /* */
     [[NSNotificationCenter defaultCenter] addObserver:sys->glESView
@@ -554,8 +555,8 @@ static void OpenglESSwap(vlc_gl_t *gl)
 
 - (void)updateConstraints
 {
-    [self reshape];
     [super updateConstraints];
+    [self reshape];
 }
 
 - (BOOL)isOpaque



More information about the vlc-commits mailing list