summaryrefslogtreecommitdiffstats
path: root/video/out/win32
Commit message (Collapse)AuthorAgeFilesLines
* vo_gpu: win: remove exclusive-fullscreen detection hackJames Ross-Gowan2017-12-202-123/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* droptarget: fix style and refactorJames Ross-Gowan2017-03-261-123/+106
| | | | | | | | | | | This makes the code more closely match mpv's style. Specifically, it changes some names from camelCase to snake_case, removes some Hungarian notation, replaces direct vtbl access with COM macros, makes use of the SAFE_RELEASE macro, moves some declarations closer to their first use, and fixes the brace style, as well as a few other things. This also makes the IDropTargetVtbl static and it fixes the buggy QueryInterface implementation.
* w32_common: move the IDropTarget impl to a separate fileJames Ross-Gowan2017-03-262-0/+266
| | | | | | This was mostly self-contained, so its removal makes w32_common.c a bit easier to read. Also, because it was self contained and its author has agreed to LGPL relicencing, the new file has the LGPL licence header.
* displayconfig: treat a refresh rate of 1 as invalidJames Ross-Gowan2016-09-181-2/+8
| | | | Found in Windows 8.1/VirtualBox.
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-111-1/+1
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* vo_opengl: win32: test for exclusive modeJames Ross-Gowan2015-11-262-0/+123
| | | | | | | | | | 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.
* w32: use DisplayConfig API to retrieve correct monitor refresh rateJames Ross-Gowan2015-11-062-0/+263
This is based on an older patch by James Ross-Gowan. It was rebased and cleaned up. Also, the DWM API usage present in the older patch was removed, because DWM reports nonsense rates at least on Windows 8.1 (they are rounded to integers, just like with the old GDI API - except the GDI API had a good excuse, as it could report only integers). Signed-off-by: wm4 <wm4@nowhere>