[vlc-commits] directdraw: in overlay mode we need to use DDSCAPS_FLIP and DDSCAPS_FRONTBUFFER

Steve Lhomme git at videolan.org
Wed Mar 9 12:00:28 CET 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Mar  9 11:16:52 2016 +0100| [351cd5a85ac220b68ba7a1ef3c87ca81d77b7d26] | committer: Jean-Baptiste Kempf

directdraw: in overlay mode we need to use DDSCAPS_FLIP and DDSCAPS_FRONTBUFFER

We use DDSCAPS_BACKBUFFER to do overlay. According to the documentation we need
these 2 flags on the front surface (the only one we have).
https://msdn.microsoft.com/en-us/library/windows/desktop/gg426110%28v=vs.85%29.aspx#DDSCAPS_BACKBUFFER
https://msdn.microsoft.com/en-us/library/windows/desktop/gg426110%28v=vs.85%29.aspx#DDSCAPS_FRONTBUFFER

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/msw/directdraw.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/msw/directdraw.c b/modules/video_output/msw/directdraw.c
index e5bc32c..eb73c09 100644
--- a/modules/video_output/msw/directdraw.c
+++ b/modules/video_output/msw/directdraw.c
@@ -861,8 +861,9 @@ static int DirectXCreateSurface(vout_display_t *vd,
     if (use_overlay) {
         ddsd.dwFlags |= DDSD_CAPS;
         ddsd.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY;
+        ddsd.ddsCaps.dwCaps |= DDSCAPS_FLIP | DDSCAPS_FRONTBUFFER;
         if (backbuffer_count > 0)
-            ddsd.ddsCaps.dwCaps |= DDSCAPS_COMPLEX | DDSCAPS_FLIP;
+            ddsd.ddsCaps.dwCaps |= DDSCAPS_COMPLEX;
 
         if (backbuffer_count > 0) {
             ddsd.dwFlags |= DDSD_BACKBUFFERCOUNT;



More information about the vlc-commits mailing list