From: Gildas Bazin Date: Wed, 26 Oct 2005 07:52:01 +0000 (+0000) Subject: * modules/video_output/directx/directx.c: support on-the-fly cropping. X-Git-Tag: 0.8.4~134 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6016460e5326686f14123f5db7d16f12dc8cbd64;p=vlc * modules/video_output/directx/directx.c: support on-the-fly cropping. --- diff --git a/modules/video_output/directx/directx.c b/modules/video_output/directx/directx.c index 416be446f4..4ccbd29e34 100644 --- a/modules/video_output/directx/directx.c +++ b/modules/video_output/directx/directx.c @@ -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