[vlc-devel] [PATCH 23/41] vout:win32: initialize the display_win32_area_t separately
Steve Lhomme
robux4 at ycbcr.xyz
Fri Mar 22 16:14:01 CET 2019
---
modules/video_output/win32/common.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 8638026074..5a32e57d42 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -71,33 +71,37 @@ static unsigned int GetPictureHeight(const vout_display_t *vd)
return vd->source.i_height;
}
+static void InitArea(display_win32_area_t *sys, const vout_display_cfg_t *vdcfg)
+{
+ sys->changes = 0;
+ SetRectEmpty(&sys->rect_display);
+ sys->vdcfg = *vdcfg;
+ sys->pf_GetPictureWidth = GetPictureWidth;
+ sys->pf_GetPictureHeight = GetPictureHeight;
+}
+
/* */
int CommonInit(vout_display_t *vd, vout_display_sys_win32_t *sys, bool b_windowless, const vout_display_cfg_t *vdcfg)
{
+ InitArea(&sys->area, vdcfg);
+
sys->hwnd = NULL;
sys->hvideownd = NULL;
sys->hparent = NULL;
sys->hfswnd = NULL;
- sys->area.changes = 0;
sys->b_windowless = b_windowless;
sys->is_first_display = true;
sys->is_on_top = false;
- sys->area.pf_GetPictureWidth = GetPictureWidth;
- sys->area.pf_GetPictureHeight = GetPictureHeight;
-
#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
sys->dxgidebug_dll = LoadLibrary(TEXT("DXGIDEBUG.DLL"));
#endif
- SetRectEmpty(&sys->area.rect_display);
#if !VLC_WINSTORE_APP
sys->pf_GetRect = GetRect;
SetRectEmpty(&sys->rect_parent);
var_Create(vd, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
- sys->area.vdcfg = *vdcfg;
-
if (b_windowless)
return VLC_SUCCESS;
--
2.17.1
More information about the vlc-devel
mailing list