summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_dxinterop.c
diff options
context:
space:
mode:
authorigv <o13g86@gmail.com>2016-02-25 17:04:39 +0200
committerwm4 <wm4@nowhere>2016-02-26 23:20:27 +0100
commit3d2fb9e9a8e8f4bff3ef5b2faec8f8dc9f916dd0 (patch)
tree20053abbb9694232a4ac8a561946fbfb9d10da0b /video/out/opengl/context_dxinterop.c
parent08dbaf1dcc43b5075976c35a2cc7060ef92e5f79 (diff)
downloadmpv-3d2fb9e9a8e8f4bff3ef5b2faec8f8dc9f916dd0.tar.bz2
mpv-3d2fb9e9a8e8f4bff3ef5b2faec8f8dc9f916dd0.tar.xz
vo_opengl: dxinterop: fix compatibility issue with Vista
Diffstat (limited to 'video/out/opengl/context_dxinterop.c')
-rw-r--r--video/out/opengl/context_dxinterop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/context_dxinterop.c b/video/out/opengl/context_dxinterop.c
index b4d999165e..d3287f1f28 100644
--- a/video/out/opengl/context_dxinterop.c
+++ b/video/out/opengl/context_dxinterop.c
@@ -16,6 +16,7 @@
*/
#include <windows.h>
+#include <versionhelpers.h>
#include <initguid.h>
#include <d3d9.h>
#include <dwmapi.h>
@@ -385,7 +386,7 @@ static void fill_presentparams(MPGLContext *ctx, D3DPRESENT_PARAMETERS *pparams)
// true, at least on Nvidia, where less than four backbuffers causes
// very high CPU usage. Use six to be safe.
.BackBufferCount = 6,
- .SwapEffect = D3DSWAPEFFECT_FLIPEX,
+ .SwapEffect = IsWindows7OrGreater() ? D3DSWAPEFFECT_FLIPEX : D3DSWAPEFFECT_FLIP,
// Automatically get the backbuffer format from the display format
.BackBufferFormat = D3DFMT_UNKNOWN,
.PresentationInterval = presentation_interval,