]> git.sesse.net Git - vlc/commitdiff
Added CommonDisplay for msw.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 2 Nov 2009 19:05:51 +0000 (20:05 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 2 Nov 2009 19:05:51 +0000 (20:05 +0100)
modules/video_output/msw/common.c
modules/video_output/msw/common.h
modules/video_output/msw/direct3d.c

index 83dac0b48f521e86b6bdeceb8ef82edc7b9c3820..5ff0f074850e9afd1bb7e20bfc5976507dc00fc8 100644 (file)
@@ -207,6 +207,30 @@ void CommonManage(vout_display_t *vd)
     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
  *****************************************************************************
index dc48711274e6a68180da4861adf00d7423603bbf..b5bbe07c4baeec5ead82d3cdd97535f532aa69b5 100644 (file)
@@ -252,6 +252,7 @@ int  CommonInit(vout_display_t *);
 void CommonClean(vout_display_t *);
 void CommonManage(vout_display_t *);
 int  CommonControl(vout_display_t *, int , va_list );
+void CommonDisplay(vout_display_t *);
 
 void UpdateRects (vout_display_t *,
                   const vout_display_cfg_t *,
index d462435700fd659e28dd4b250ff0d39c9719c205..856e19667d8aec2dcd67a3a2a0eacd844f2413ae 100644 (file)
@@ -277,27 +277,14 @@ static void Display(vout_display_t *vd, picture_t *picture)
     if (FAILED(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
     VLC_UNUSED(picture);
 #else
     /* XXX See Prepare() */
     picture_Release(picture);
 #endif
+
+    CommonDisplay(vd);
 }
 static int ControlResetDevice(vout_display_t *vd)
 {