From b7d614aa0d910a9e426bd1bd81755e43bc95214f Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Wed, 25 Nov 2015 22:07:22 +1100 Subject: vo_opengl: win32: test for exclusive mode This is a hack, but unfortunately the DwmGetCompositionTimingInfo heuristic does not work in all cases (with multiple-monitors on Windows 8.1 and even with a single monitor in Windows 10.) See the comment in mp_w32_is_in_exclusive_mode() for more details. It should go without saying that if any better method of doing this reveals itself, this hack should be dropped. --- video/out/opengl/w32.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'video/out/opengl') diff --git a/video/out/opengl/w32.c b/video/out/opengl/w32.c index 6080c303ba..2525ccfc1f 100644 --- a/video/out/opengl/w32.c +++ b/video/out/opengl/w32.c @@ -24,6 +24,7 @@ #include #include #include "video/out/w32_common.h" +#include "video/out/win32/exclusive_hack.h" #include "common.h" struct w32_context { @@ -325,6 +326,11 @@ static bool compositor_active(MPGLContext *ctx) if (FAILED(w32_ctx->pDwmGetCompositionTimingInfo(0, &info))) return false; + // Test if a program is running in exclusive fullscreen mode. If so, it's + // probably this one, so it's not getting redirected by the compositor. + if (mp_w32_is_in_exclusive_mode()) + return false; + return true; } -- cgit v1.2.3