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. --- options/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index a803dccf5d..4c42164111 100644 --- a/options/options.c +++ b/options/options.c @@ -168,7 +168,7 @@ static const m_option_t mp_vo_opt_list[] = { OPT_CHOICE("x11-bypass-compositor", x11_bypass_compositor, 0, ({"no", 0}, {"yes", 1}, {"fs-only", 2}, {"never", 3})), #endif -#if HAVE_WIN32 +#if HAVE_WIN32_DESKTOP OPT_STRING("vo-mmcss-profile", mmcss_profile, 0), #endif #if HAVE_DRM @@ -273,7 +273,7 @@ const m_option_t mp_opts[] = { OPT_STRING("log-file", log_file, CONF_PRE_PARSE | M_OPT_FILE | UPDATE_TERM), OPT_FLAG("msg-module", msg_module, UPDATE_TERM), OPT_FLAG("msg-time", msg_time, UPDATE_TERM), -#if defined(_WIN32) && HAVE_GPL +#if HAVE_WIN32_DESKTOP && HAVE_GPL OPT_CHOICE("priority", w32_priority, UPDATE_PRIORITY, ({"no", 0}, {"realtime", REALTIME_PRIORITY_CLASS}, -- cgit v1.2.3