From 3d8ca93d2361632112c584bde413554cf15f2189 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Tue, 19 Dec 2017 20:48:44 +1100 Subject: vo_gpu: win: remove exclusive-fullscreen detection hack This hack was part of a solution to VSync judder in desktop OpenGL on Windows. Rather than using blocking-SwapBuffers(), mpv could use DwmFlush() to wait for the image to be presented by the compositor. Since this would only work while the compositor was running, and the compositor was silently disabled when OpenGL entered exclusive fullscreen mode, mpv needed a way to detect exclusive fullscreen mode. The code that is being removed could detect exclusive fullscreen mode by checking the state of an undocumented mutex using undocumented native API functions, but because of how fragile it was, it was always meant to be removed when a better solution for accurate VSync in OpenGL was found. Since then, mpv got the dxinterop backend, which uses desktop OpenGL but has accurate VSync. It also got a native Direct3D 11 backend, which is a viable alternative to OpenGL on Windows. For people who are still using desktop OpenGL with WGL, there shouldn't be much of a difference, since mpv can use other API functions to detect exclusive fullscreen. --- video/out/win32/exclusive_hack.h | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 video/out/win32/exclusive_hack.h (limited to 'video/out/win32/exclusive_hack.h') diff --git a/video/out/win32/exclusive_hack.h b/video/out/win32/exclusive_hack.h deleted file mode 100644 index 883e2159fa..0000000000 --- a/video/out/win32/exclusive_hack.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of mpv. - * - * mpv is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * mpv is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with mpv. If not, see . - */ - -#ifndef MP_WIN32_EXCLUSIVE_HACK_H_ -#define MP_WIN32_EXCLUSIVE_HACK_H_ - -#include - -// Returns true if any program on the computer is in exclusive fullscreen mode -bool mp_w32_is_in_exclusive_mode(void); - -#endif -- cgit v1.2.3