]> git.sesse.net Git - vlc/commitdiff
* modules/video_output/directx/glwin32.c: support on-the-fly crop changes.
authorGildas Bazin <gbazin@videolan.org>
Thu, 27 Oct 2005 09:52:30 +0000 (09:52 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 27 Oct 2005 09:52:30 +0000 (09:52 +0000)
modules/video_output/directx/glwin32.c

index b1c031501c367f0fe3331b18b177adc4e3ff6630..c88af49143e9c835bc7ae71990477581b4902d63 100644 (file)
@@ -302,6 +302,19 @@ static int Manage( vout_thread_t *p_vout )
         vlc_mutex_unlock( &p_vout->p_sys->lock );
     }
 
+    /* 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