[vlc-commits] directdraw: in overlay mode we need to use DDSCAPS_FLIP and DDSCAPS_FRONTBUFFER
Steve Lhomme
git at videolan.org
Wed Mar 9 13:23:26 CET 2016
vlc/vlc-2.2 | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Mar 9 11:16:52 2016 +0100| [11f7a3676d9717970f7240ba9f251ae47f7c9a08] | 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>
(cherry picked from commit 351cd5a85ac220b68ba7a1ef3c87ca81d77b7d26)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=11f7a3676d9717970f7240ba9f251ae47f7c9a08
---
modules/video_output/msw/directx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index 6ce1eab..22770fd 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.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