summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.h
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2015-03-17 01:15:28 +0200
committerwm4 <wm4@nowhere>2015-04-09 20:36:35 +0200
commit843bc822a8a7974c7fbeea62525cb56bbab23fde (patch)
tree0ce52c36cbae7804ce12d922c3bddc6bcb0dda25 /video/out/gl_common.h
parentc97f014576143c706e9d5189a89fa9959a651c71 (diff)
downloadmpv-843bc822a8a7974c7fbeea62525cb56bbab23fde.tar.bz2
mpv-843bc822a8a7974c7fbeea62525cb56bbab23fde.tar.xz
opengl: win32 - add option 'dwmflush' to sync in DWM
This could help in cases where the DWM (Windows desktop compositor) adds another layer of bufferring and therefore the SwapBuffers timing could get messed up. Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r--video/out/gl_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/gl_common.h b/video/out/gl_common.h
index 2e25d331c7..06960f75ea 100644
--- a/video/out/gl_common.h
+++ b/video/out/gl_common.h
@@ -93,6 +93,12 @@ typedef struct MPGLContext {
void (*releaseGlContext)(struct MPGLContext *);
void (*set_current)(struct MPGLContext *, bool current);
+ // Used on windows only, tries to vsync with the DWM, and modifies SwapInterval
+ // when it does so. Returns the possibly modified swapinterval value.
+ int (*DwmFlush)(struct MPGLContext *, int opt_dwmflush,
+ int opt_swapinterval, int current_swapinterval);
+
+
// Resize the window, or create a new window if there isn't one yet.
// On the first call, it creates a GL context according to what's specified
// in MPGLContext.requested_gl_version. This is just a hint, and if the