]> git.sesse.net Git - vlc/commitdiff
macosx/voutgl.m: fixed --macosx-stretch in GL provider
authorEric Petit <titer@videolan.org>
Wed, 16 Mar 2005 15:49:18 +0000 (15:49 +0000)
committerEric Petit <titer@videolan.org>
Wed, 16 Mar 2005 15:49:18 +0000 (15:49 +0000)
modules/gui/macosx/voutgl.m

index 19614a26ce174a116eadf870ba07e3a5db46122e..a7be32372e46efd1ed315ed712516266cc165a5c 100644 (file)
@@ -274,10 +274,19 @@ static void Swap( vout_thread_t * p_vout )
 - (void) reshape
 {
     int x, y;
+    vlc_value_t val;
     NSRect bounds = [self bounds];
+
     [[self openGLContext] makeCurrentContext];
-    if( bounds.size.height * p_vout->render.i_aspect <
-            bounds.size.width * VOUT_ASPECT_FACTOR )
+
+    var_Get( p_vout, "macosx-stretch", &val );
+    if( val.b_bool )
+    {
+        x = bounds.size.width;
+        y = bounds.size.height;
+    }
+    else if( bounds.size.height * p_vout->render.i_aspect <
+             bounds.size.width * VOUT_ASPECT_FACTOR )
     {
         x = bounds.size.height * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR;
         y = bounds.size.height;