summaryrefslogtreecommitdiffstats
path: root/video/out/w32_common.c
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@xonotic.org>2012-12-19 12:58:52 +0100
committerRudolf Polzer <divverent@xonotic.org>2012-12-19 12:58:52 +0100
commit7d0a20954f4ad642901a65fcb39ab601032ddcea (patch)
tree5699e70be76ec3f5ba2cc49faed378a3034601a7 /video/out/w32_common.c
parent51c98619c8d039b4cf459910a3a934637cb69e05 (diff)
downloadmpv-7d0a20954f4ad642901a65fcb39ab601032ddcea.tar.bz2
mpv-7d0a20954f4ad642901a65fcb39ab601032ddcea.tar.xz
core: make WAKEUP_PERIOD overridable by the vo
This is better than having just the operating system type decide the wakeup period, as e.g. when compiling for Win32/cygwin, a wakeup period of 0.5 would work perfectly fine. Instead, the default wakeup period is now only decided by availability of a working select() system call (which is the case on cygwin but not mingw and MSVC) AND a vo that can provide an event file descriptor or a similar hack (vo_corevideo). vos that cannot do either need polling for event handling and now can set the wakeup period to 0.02 in the vo code.
Diffstat (limited to 'video/out/w32_common.c')
-rw-r--r--video/out/w32_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index ab608f5d8d..113ca2dddd 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -666,6 +666,9 @@ int vo_w32_init(struct vo *vo)
if (WinID >= 0)
EnableWindow(w32->window, 0);
+ // we don't have proper event handling
+ vo->wakeup_period = 0.02;
+
updateScreenProperties(vo);
mp_msg(MSGT_VO, MSGL_V, "vo: win32: running at %dx%d with depth %d\n",