build: ensure HAVE_WIN32_SMTC is always defined

It makes sense to only descend into the subdirectory meson build file on
windows, but we should always make sure HAVE_WIN32_SMTC is 0 for other
platforms. Otherwise, it gets unneccesarily awkward to work with.
This commit is contained in:
Dudemanguy authored and sfan5 committed 2024-09-23 22:13:51 +02:00
1 parent b64c53f730
commit 2bd1e78701
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -530,8 +530,11 @@ if not posix and not features['win32-desktop']
'osdep/terminal-dummy.c')
endif
# media controls
if win32
subdir('osdep/win32')
else
features += {'win32-smtc': false}
endif
features += {'glob-posix': cc.has_function('glob', prefix: '#include <glob.h>')}
+1 -1
View File
@@ -399,7 +399,7 @@ int mp_initialize(struct MPContext *mpctx, char **options)
cocoa_set_mpv_handle(ctx);
#endif
#if defined(HAVE_WIN32_SMTC) && HAVE_WIN32_SMTC
#if HAVE_WIN32_SMTC
if (opts->media_controls == 2 || (mpctx->is_cli && opts->media_controls == 1))
mp_smtc_init(mp_new_client(mpctx->clients, "SystemMediaTransportControls"));
#endif