vo_opengl: change dwmflush option values

Use a choice instead of an integer. This is incompatible, but I'm not
adding any compatibility since this option was added recently.
This commit is contained in:
wm4 2015-04-14 14:29:05 +02:00
parent 9e0cd3b3e7
commit d704d61c61
2 changed files with 6 additions and 4 deletions

View File

@ -548,10 +548,11 @@ Available video output drivers are:
X11/GLX only.
``dwmflush``
Calls ``DwmFlush`` after swapping buffers on Windows (default: 0).
``dwmflush=<no|windowed|yes>``
Calls ``DwmFlush`` after swapping buffers on Windows (default: no).
It also sets ``SwapInterval(0)`` to ignore the OpenGL timing. Values
are: 0 (disabled), 1 (only in windowed mode), 2 (also in full screen).
are: no (disabled), windowed (only in windowed mode), yes (also in
full screen).
This may help getting more consistent frame intervals, especially with
high-fps clips - which might also reduce dropped frames. Typically a
value of 1 should be enough since full screen may bypass the DWM.

View File

@ -507,7 +507,8 @@ static const struct m_option options[] = {
OPT_FLAG("glfinish", use_glFinish, 0),
OPT_FLAG("waitvsync", waitvsync, 0),
OPT_INT("swapinterval", swap_interval, 0, OPTDEF_INT(1)),
OPT_INT("dwmflush", dwm_flush, 0, OPTDEF_INT(0)),
OPT_CHOICE("dwmflush", dwm_flush, 0,
({"no", 0}, {"windowed", 1}, {"yes", 2})),
OPT_FLAG("debug", use_gl_debug, 0),
OPT_STRING_VALIDATE("backend", backend, 0, mpgl_validate_backend_opt),
OPT_FLAG("sw", allow_sw, 0),