]> git.sesse.net Git - vlc/commitdiff
* modules/video_output/directx/directx.c: support on-the-fly cropping.
authorGildas Bazin <gbazin@videolan.org>
Wed, 26 Oct 2005 07:52:01 +0000 (07:52 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 26 Oct 2005 07:52:01 +0000 (07:52 +0000)
modules/video_output/directx/directx.c

index 416be446f4302c88f43782cb81d0e5d44cf4b741..4ccbd29e3464141fa6ff445d68d036e37ffc5ff5 100644 (file)
@@ -539,6 +539,19 @@ static int Manage( vout_thread_t *p_vout )
         }
     }
 
+    /* Check for cropping changes */
+    if( p_vout->fmt_out.i_x_offset != p_vout->fmt_in.i_x_offset ||
+        p_vout->fmt_out.i_y_offset != p_vout->fmt_in.i_y_offset ||
+        p_vout->fmt_out.i_visible_width != p_vout->fmt_in.i_visible_width ||
+        p_vout->fmt_out.i_visible_height != p_vout->fmt_in.i_visible_height )
+    {
+        p_vout->fmt_out.i_x_offset = p_vout->fmt_in.i_x_offset;
+        p_vout->fmt_out.i_y_offset = p_vout->fmt_in.i_y_offset;
+        p_vout->fmt_out.i_visible_width = p_vout->fmt_in.i_visible_width;
+        p_vout->fmt_out.i_visible_height = p_vout->fmt_in.i_visible_height;
+        E_(DirectXUpdateRects)( p_vout, VLC_TRUE );
+    }
+
     /* We used to call the Win32 PeekMessage function here to read the window
      * messages. But since window can stay blocked into this function for a
      * long time (for example when you move your window on the screen), I