Commit 0c204dcb authored by Laurent Aimar's avatar Laurent Aimar

Added CommonDisplay for msw.

parent 95c2afcd
...@@ -207,6 +207,30 @@ void CommonManage(vout_display_t *vd) ...@@ -207,6 +207,30 @@ void CommonManage(vout_display_t *vd)
EventThreadMouseAutoHide(sys->event); EventThreadMouseAutoHide(sys->event);
} }
/**
* It ensures that the video window is shown after the first picture
* is displayed.
*/
void CommonDisplay(vout_display_t *vd)
{
vout_display_sys_t *sys = vd->sys;
if (!sys->is_first_display)
return;
/* Video window is initially hidden, show it now since we got a
* picture to show.
*/
SetWindowPos(sys->hvideownd, 0, 0, 0, 0, 0,
SWP_ASYNCWINDOWPOS|
SWP_FRAMECHANGED|
SWP_SHOWWINDOW|
SWP_NOMOVE|
SWP_NOSIZE|
SWP_NOZORDER);
sys->is_first_display = false;
}
/***************************************************************************** /*****************************************************************************
* UpdateRects: update clipping rectangles * UpdateRects: update clipping rectangles
***************************************************************************** *****************************************************************************
......
...@@ -252,6 +252,7 @@ int CommonInit(vout_display_t *); ...@@ -252,6 +252,7 @@ int CommonInit(vout_display_t *);
void CommonClean(vout_display_t *); void CommonClean(vout_display_t *);
void CommonManage(vout_display_t *); void CommonManage(vout_display_t *);
int CommonControl(vout_display_t *, int , va_list ); int CommonControl(vout_display_t *, int , va_list );
void CommonDisplay(vout_display_t *);
void UpdateRects (vout_display_t *, void UpdateRects (vout_display_t *,
const vout_display_cfg_t *, const vout_display_cfg_t *,
......
...@@ -277,27 +277,14 @@ static void Display(vout_display_t *vd, picture_t *picture) ...@@ -277,27 +277,14 @@ static void Display(vout_display_t *vd, picture_t *picture)
if (FAILED(hr)) { if (FAILED(hr)) {
msg_Dbg(vd, "%s:%d (hr=0x%0lX)", __FUNCTION__, __LINE__, hr); msg_Dbg(vd, "%s:%d (hr=0x%0lX)", __FUNCTION__, __LINE__, hr);
} }
if (sys->is_first_display) {
/* Video window is initially hidden, show it now since we got a
* picture to show.
*/
SetWindowPos(vd->sys->hvideownd, 0, 0, 0, 0, 0,
SWP_ASYNCWINDOWPOS|
SWP_FRAMECHANGED|
SWP_SHOWWINDOW|
SWP_NOMOVE|
SWP_NOSIZE|
SWP_NOZORDER);
sys->is_first_display = false;
}
#if 0 #if 0
VLC_UNUSED(picture); VLC_UNUSED(picture);
#else #else
/* XXX See Prepare() */ /* XXX See Prepare() */
picture_Release(picture); picture_Release(picture);
#endif #endif
CommonDisplay(vd);
} }
static int ControlResetDevice(vout_display_t *vd) static int ControlResetDevice(vout_display_t *vd)
{ {
......
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