0016-vout_ios2-take-into-account-scale-of-attached-screen.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From f087db5f78d0b5a9ac67f0b664b115ba729c2302 Mon Sep 17 00:00:00 2001
  2. From: Gleb Pinigin <gpinigin@gmail.com>
  3. Date: Fri, 2 Aug 2013 19:41:55 +0700
  4. Subject: [PATCH 16/16] vout_ios2: take into account scale of attached screen
  5. As said in Apple documentation drawRect should not be implemented for view based on opengl es layer.
  6. Instead contentScaleFactor should be changed manually if needed. Underlying opengl es layer will adjust its scale accordingly.
  7. ---
  8. modules/video_output/ios2.m | 6 +++---
  9. 1 file changed, 3 insertions(+), 3 deletions(-)
  10. diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
  11. index 28369b4..397be6d 100644
  12. --- a/modules/video_output/ios2.m
  13. +++ b/modules/video_output/ios2.m
  14. @@ -393,10 +393,10 @@ static void OpenglESSwap(vlc_gl_t *gl)
  15. [super dealloc];
  16. }
  17. -/* we don't get the correct scale factor if we don't overwrite this method */
  18. -- (void)drawRect:(CGRect) rect
  19. +- (void)didMoveToWindow
  20. {
  21. - [super drawRect:rect];
  22. + self.contentScaleFactor = self.window.screen.scale;
  23. + _bufferNeedReset = YES;
  24. }
  25. - (void)createBuffers
  26. --
  27. 1.7.12.4 (Apple Git-37)