From 7eca787571aab982acaadee79abb0f40f9f14b6a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 27 Jun 2017 13:47:46 +0200 Subject: build: change how some OS specific source files are selected In a bunch of cases, we emulate highly platform specific APIs on a higher level across all OSes, such as IPC, terminal, subprocess handling, and more. We have source files for each OS, and they implement all the same mpv internal API. Selecting which source file to use on an OS can be tricky, because there is partially overlapping and emulated APIs (consider Cygwin on Windows). Add a pick_first_matching_dep() function to make this slightly easier and more structured. Also add dummy backends in some cases, to deal with APIs not being available. Clarify the Windows dependency identifiers, as these are the most confusing. --- osdep/terminal-dummy.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 osdep/terminal-dummy.c (limited to 'osdep/terminal-dummy.c') diff --git a/osdep/terminal-dummy.c b/osdep/terminal-dummy.c new file mode 100644 index 0000000000..4a3787e0fa --- /dev/null +++ b/osdep/terminal-dummy.c @@ -0,0 +1,31 @@ +#include "terminal.h" + +void terminal_init(void) +{ +} + +void terminal_setup_getch(struct input_ctx *ictx) +{ +} + +void terminal_uninit(void) +{ +} + +bool terminal_in_background(void) +{ + return false; +} + +void terminal_get_size(int *w, int *h) +{ +} + +void mp_write_console_ansi(void *wstream, char *buf) +{ +} + +bool terminal_try_attach(void) +{ + return false; +} -- cgit v1.2.3