[vlc-commits] direct3d11: use the new flag telling when the display rectangle changed

Steve Lhomme git at videolan.org
Mon Apr 1 12:03:48 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Mar 22 14:29:56 2019 +0100| [98fe668c43973389373be7a2283d3307153a0fe0] | committer: Steve Lhomme

direct3d11: use the new flag telling when the display rectangle changed

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98fe668c43973389373be7a2283d3307153a0fe0
---

 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 57b0a21a6e..915c5d5a94 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -230,13 +230,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.rect_dest;
 
     CommonManage(vd, &sys->sys);
 
-    if (!RectEquals(&before_dest, &sys->sys.rect_dest))
+    if ( sys->sys.rect_dest_changed )
     {
         UpdateSize(vd);
+        sys->sys.rect_dest_changed =false;
     }
 }
 
@@ -750,8 +750,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.rect_dest;
-
     int res = CommonControl( vd, &sys->sys, query, args );
 
     if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
@@ -764,9 +762,10 @@ static int Control(vout_display_t *vd, int query, va_list args)
         }
     }
 
-    if (!RectEquals(&before_dest, &sys->sys.rect_dest) )
+    if ( sys->sys.rect_dest_changed )
     {
         UpdateSize(vd);
+        sys->sys.rect_dest_changed =false;
     }
 
     return res;



More information about the vlc-commits mailing list