[vlc-commits] macosx vout: also do crop if macosx-video-autoresize is false

David Fuhrmann git at videolan.org
Sun Mar 11 18:46:09 CET 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Mar 11 18:40:10 2012 +0100| [88a67f9e512ccba576c59c7f94d587808e6b9809] | committer: David Fuhrmann

macosx vout: also do crop if macosx-video-autoresize is false
(cherry picked from commit bb20070a980134c728d5d57c9203784006f5a82c)

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

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

 modules/video_output/macosx.m |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 5007be6..bcf8eaa 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -340,9 +340,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             if (!vd->sys)
                 return VLC_EGENERIC;
 
-            if (!config_GetInt( vd, "macosx-video-autoresize" ))
-                return VLC_SUCCESS;
-
             NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
             NSPoint topleftbase;
             NSPoint topleftscreen;
@@ -421,7 +418,8 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             // is needed in the case we do not an actual resize
             [sys->glView performSelectorOnMainThread:@selector(reshapeView:) withObject:nil waitUntilDone:NO];
 
-            if( i_height != glViewFrame.size.height || i_width != glViewFrame.size.width )
+            if (config_GetInt (vd, "macosx-video-autoresize") && query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE &&
+                (i_height != glViewFrame.size.height || i_width != glViewFrame.size.width))
             {
                 new_frame.size.width = windowFrame.size.width - glViewFrame.size.width + i_width;
                 new_frame.size.height = windowFrame.size.height - glViewFrame.size.height + i_height;



More information about the vlc-commits mailing list