diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-17 22:27:12 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-10 19:10:55 +0000 |
commit | 5d44cf93df47046c779fc4da68a09812a2ce4004 (patch) | |
tree | 07f9fca72a897210f2fb0682773a0cef4efb456f /meson.build | |
parent | ba4b408b8bdc2aa0059abaaffe8b16f28aec480b (diff) | |
download | mpv-5d44cf93df47046c779fc4da68a09812a2ce4004.tar.bz2 mpv-5d44cf93df47046c779fc4da68a09812a2ce4004.tar.xz |
vo: use mp_poll wrapper in wait_events when applicable
On linux, several platforms poll for events over a fd. This has ms
accuracy, but mpv's timer is in ns now so lots of precision is lost. We
can use an mp_poll wrapper to use ppoll instead which takes a timespec
directly with nanosecond precision. On systems without ppoll this falls
back to old poll behavior. On wayland, we don't actually use this
because ppoll completely messes up the event loop for some unknown
reason.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 91b8e84b15..4485c74a56 100644 --- a/meson.build +++ b/meson.build @@ -424,6 +424,9 @@ if posix and not darwin 'osdep/timer-linux.c') endif +features += {'ppoll': cc.has_function('ppoll', args: '-D_GNU_SOURCE', + prefix: '#include <poll.h>')} + cd_devices = { 'windows': 'D:', 'cygwin': 'D:', |