Commit 600ac6c9 authored by Damien Fouilleul's avatar Damien Fouilleul

directx.c: some improvement on overlay initial grey flickering

parent 61bf3204
...@@ -851,6 +851,12 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -851,6 +851,12 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
*/ */
static void OverlayDisplay( vout_thread_t *p_vout, picture_t *p_pic ) static void OverlayDisplay( vout_thread_t *p_vout, picture_t *p_pic )
{ {
/* get initial picture rendered on overlay surface */
Display(p_vout, p_pic);
IDirectDraw_WaitForVerticalBlank(p_vout->p_sys->p_ddobject,
DDWAITVB_BLOCKBEGIN, NULL);
/* set the colorkey as the backgound brush for the video window */ /* set the colorkey as the backgound brush for the video window */
SetClassLong( p_vout->p_sys->hvideownd, GCL_HBRBACKGROUND, SetClassLong( p_vout->p_sys->hvideownd, GCL_HBRBACKGROUND,
(LONG)CreateSolidBrush( p_vout->p_sys->i_rgb_colorkey ) ); (LONG)CreateSolidBrush( p_vout->p_sys->i_rgb_colorkey ) );
...@@ -858,7 +864,6 @@ static void OverlayDisplay( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -858,7 +864,6 @@ static void OverlayDisplay( vout_thread_t *p_vout, picture_t *p_pic )
/* use and restores proper display function for further pictures */ /* use and restores proper display function for further pictures */
p_vout->pf_display = Display; p_vout->pf_display = Display;
Display(p_vout, p_pic);
} }
/* following functions are local */ /* following functions are local */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment