diff --git a/src/Ryujinx.Common/Utilities/AVUtils.cs b/src/Ryujinx.Common/Utilities/AVUtils.cs index 246d0740b..3238d0cfe 100644 --- a/src/Ryujinx.Common/Utilities/AVUtils.cs +++ b/src/Ryujinx.Common/Utilities/AVUtils.cs @@ -6,11 +6,11 @@ namespace Ryujinx.Common.Utilities { public static class AVUtils { - public static string GetAVName() + public static bool IsRunningThirdPartyAV() { if (!OperatingSystem.IsWindows()) { - return null; + return false; } ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@"root\SecurityCenter2", "SELECT * FROM AntiVirusProduct"); @@ -23,7 +23,7 @@ namespace Ryujinx.Common.Utilities string displayName = (string)dataObj["displayName"]; if (displayName != "Windows Defender") { - return displayName; + return true; } } catch (ManagementException) @@ -32,7 +32,7 @@ namespace Ryujinx.Common.Utilities } } - return null; + return false; } } } diff --git a/src/Ryujinx.Gtk3/Program.cs b/src/Ryujinx.Gtk3/Program.cs index 73f2b9f48..d2d3b6033 100644 --- a/src/Ryujinx.Gtk3/Program.cs +++ b/src/Ryujinx.Gtk3/Program.cs @@ -342,10 +342,9 @@ namespace Ryujinx Logger.Notice.Print(LogClass.Application, $"Ryujinx Version: {Version}"); SystemInfo.Gather().Print(); - string avName = AVUtils.GetAVName(); - if (avName != null) + if (AVUtils.IsRunningThirdPartyAV()) { - Logger.Notice.Print(LogClass.Application, $"Detected AV: {avName}"); + Logger.Notice.Print(LogClass.Application, $"Third-Party AV active"); } var enabledLogs = Logger.GetEnabledLevels(); diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index 2b86987dd..03bfc6365 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -215,10 +215,9 @@ namespace Ryujinx.Ava Logger.Notice.Print(LogClass.Application, $"Ryujinx Version: {Version}"); SystemInfo.Gather().Print(); - string avName = AVUtils.GetAVName(); - if (avName != null) + if (AVUtils.IsRunningThirdPartyAV()) { - Logger.Notice.Print(LogClass.Application, $"Detected AV: {avName}"); + Logger.Notice.Print(LogClass.Application, $"Third-Party AV active"); } Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {(Logger.GetEnabledLevels().Count == 0 ? "" : string.Join(", ", Logger.GetEnabledLevels()))}");