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

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


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

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

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

 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 68a35fa..52bfab7 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -207,9 +207,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);
+    vout_display_SendEventDisplaySize(vd, viewSize.width * scaleFactor, viewSize.height * scaleFactor, false);
 
     /* */
     [[NSNotificationCenter defaultCenter] addObserver:sys->glESView
@@ -547,8 +548,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