[vlc-devel] [PATCH 36/41] direct3d11: use the new flag telling when the display rectangle changed

Steve Lhomme robux4 at ycbcr.xyz
Fri Mar 22 16:14:14 CET 2019


---
 modules/video_output/win32/direct3d11.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 9a39ca5998..747634c34c 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -227,13 +227,13 @@ static void UpdateSize(vout_display_t *vd)
 static void Manage(vout_display_t *vd)
 {
     vout_display_sys_t *sys = vd->sys;
-    RECT before_dest = sys->sys.area.rect_dest;
 
     CommonManage(vd, &sys->sys);
 
-    if (!RectEquals(&before_dest, &sys->sys.area.rect_dest))
+    if ( sys->sys.area.rect_dest_changed )
     {
         UpdateSize(vd);
+        sys->sys.area.rect_dest_changed =false;
     }
 }
 
@@ -743,8 +743,6 @@ static void SetQuadVSProjection(vout_display_t *vd, d3d_quad_t *quad, const vlc_
 static int Control(vout_display_t *vd, int query, va_list args)
 {
     vout_display_sys_t *sys = vd->sys;
-    RECT before_dest = sys->sys.area.rect_dest;
-
     int res = CommonControl( vd, &sys->sys, query, args );
 
     if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
@@ -757,9 +755,10 @@ static int Control(vout_display_t *vd, int query, va_list args)
         }
     }
 
-    if (!RectEquals(&before_dest, &sys->sys.area.rect_dest) )
+    if ( sys->sys.area.rect_dest_changed )
     {
         UpdateSize(vd);
+        sys->sys.area.rect_dest_changed =false;
     }
 
     return res;
-- 
2.17.1



More information about the vlc-devel mailing list