[vlc-devel] [PATCH 22/41] vout:win32: use a local SetRectEmpty in Winstore builds
Steve Lhomme
robux4 at ycbcr.xyz
Fri Mar 22 16:14:00 CET 2019
---
modules/video_output/win32/common.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 9fd58e7fbd..8638026074 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -53,7 +53,13 @@ static bool GetRect(const vout_display_sys_win32_t *sys, RECT *out)
return false;
return GetClientRect(sys->hwnd, out);
}
-#endif
+#else /* VLC_WINSTORE_APP */
+static BOOL SetRectEmpty(RECT *rect)
+{
+ rect->left = rect->right = rect->top = rect->bottom = 0;
+ return TRUE;
+}
+#endif /* VLC_WINSTORE_APP */
static unsigned int GetPictureWidth(const vout_display_t *vd)
{
@@ -83,9 +89,9 @@ int CommonInit(vout_display_t *vd, vout_display_sys_win32_t *sys, bool b_windowl
#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->area.rect_display);
SetRectEmpty(&sys->rect_parent);
var_Create(vd, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
@@ -228,9 +234,7 @@ static void UpdateRectsInternal(vout_display_t *vd, vout_display_sys_win32_t *sy
/* the 2 following lines are to fix a bug when clicking on the desktop */
if (place.width == 0 || place.height == 0) {
-#if !VLC_WINSTORE_APP
SetRectEmpty(&rect_src_clipped);
-#endif
goto exit;
}
--
2.17.1
More information about the vlc-devel
mailing list