0007-vout_ios-respond-to-HUD-visiblity-changes-by-adaptin.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From e5b2b9413079dc71f6df3c06c36d702f69776ac0 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Wed, 26 Sep 2012 19:23:24 +0200
  4. Subject: [PATCH 07/10] vout_ios: respond to HUD visiblity changes by adapting
  5. the layout accordingly
  6. ---
  7. modules/video_output/ios.m | 11 +++++++++++
  8. 1 file changed, 11 insertions(+)
  9. diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
  10. index 2dc0929..5ca8cea 100644
  11. --- a/modules/video_output/ios.m
  12. +++ b/modules/video_output/ios.m
  13. @@ -348,12 +348,15 @@ static void OpenglSwap(vlc_gl_t *gl)
  14. _framebufferDirty = NO;
  15. [self setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
  16. +
  17. + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(toggleHUDmode:) name:@"VLCHUDModeChanged" object:nil];
  18. }
  19. return self;
  20. }
  21. - (void) dealloc
  22. {
  23. + [[NSNotificationCenter defaultCenter] removeObserver:self];
  24. [_context release];
  25. [super dealloc];
  26. }
  27. @@ -369,6 +372,14 @@ static void OpenglSwap(vlc_gl_t *gl)
  28. }
  29. }
  30. +/**
  31. + * gets called when the status bar resizes
  32. + */
  33. +- (void)toggleHUDmode:(NSNotification *)aNotification
  34. +{
  35. + [self layoutSubviews];
  36. +}
  37. +
  38. /**
  39. * Method called by UIKit when we have been resized
  40. --
  41. 1.7.12.4 (Apple Git-37)