From 896cd4adb29d0a5f5f6b2b2ccd59602b04a3b43d Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Tue, 20 Jun 2023 22:29:23 +0200 Subject: [PATCH] libobs: Detect and log presence of Lenovo Vantage on Windows This software seems to be pre-installed on many Lenovo systems and has a "Network Boost" feature that restricts data usage of background apps, causing throughput issues when streaming with OBS. --- libobs/obs-windows.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/libobs/obs-windows.c b/libobs/obs-windows.c index f889b41e1..4c0da5483 100644 --- a/libobs/obs-windows.c +++ b/libobs/obs-windows.c @@ -133,6 +133,31 @@ static void log_available_memory(void) (DWORD)(ms.ullAvailPhys / 1048576), note); } +static void log_lenovo_vantage(void) +{ + SC_HANDLE manager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT); + + if (!manager) + return; + + SC_HANDLE service = + OpenService(manager, L"FBNetFilter", SERVICE_QUERY_STATUS); + + if (service) { + blog(LOG_WARNING, + "Lenovo Vantage / Legion Edge is installed. The \"Network Boost\" " + "feature must be disabled when streaming with OBS."); + CloseServiceHandle(service); + } + + CloseServiceHandle(manager); +} + +static void log_conflicting_software(void) +{ + log_lenovo_vantage(); +} + extern const char *get_win_release_id(); static void log_windows_version(void) @@ -382,6 +407,7 @@ void log_system_info(void) log_admin_status(); log_gaming_features(); log_security_products(); + log_conflicting_software(); } struct obs_hotkeys_platform {