summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-14 16:21:04 +0200
committerwm4 <wm4@nowhere>2014-09-14 16:24:01 +0200
commite0b4daf3ad240ecf70af73c13b6ca9b1062a507f (patch)
treee52d79650aa69c0288dd5d9c896ab943c692f88f /wscript_build.py
parentb44571ababeb368e94df6665c1d370d817a51135 (diff)
downloadmpv-e0b4daf3ad240ecf70af73c13b6ca9b1062a507f.tar.bz2
mpv-e0b4daf3ad240ecf70af73c13b6ca9b1062a507f.tar.xz
input: use libwaio for pipe input on Windows
Use libwaio to read from pipes (stdin or named pipes) on Windows. This liberates us from nasty issues, such as pipes (as created by most programs) not being possible to read in a non-blocking or event-driven way. Although it would be possible to do that in a somewhat sane way on Vista+, it's still not easy, and on XP it's especially hard. libwaio handles these things for us. Move pipe.c to pipe-unix.c, and remove Windows specific things. Also adjust the input.c code to make this work cleanly.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wscript_build.py b/wscript_build.py
index 3985d7515d..c8dc6a42f1 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -190,7 +190,8 @@ def build(ctx):
( "input/event.c" ),
( "input/input.c" ),
( "input/keycodes.c" ),
- ( "input/pipe.c" ),
+ ( "input/pipe-unix.c", "!mingw" ),
+ ( "input/pipe-win32.c", "waio" ),
( "input/joystick.c", "joystick" ),
( "input/lirc.c", "lirc" ),