diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2015-11-25 22:07:22 +1100 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2015-11-26 00:38:03 +1100 |
commit | b7d614aa0d910a9e426bd1bd81755e43bc95214f (patch) | |
tree | 6c8076a34059f27e7ac17e8eaafc9f1aa43af95c /video/out/opengl | |
parent | dab2e909afffd3ed479e652931d13935d5908af5 (diff) | |
download | mpv-b7d614aa0d910a9e426bd1bd81755e43bc95214f.tar.bz2 mpv-b7d614aa0d910a9e426bd1bd81755e43bc95214f.tar.xz |
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.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/w32.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 <windows.h> #include <dwmapi.h> #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; } |