From 3bf8a17f018458f640859b41e4d51b828f1793ab Mon Sep 17 00:00:00 2001 From: KeatonTheBot Date: Sat, 21 Feb 2026 14:02:34 -0600 Subject: [PATCH] Tweak GetCpuName code --- .../SystemInfo/WindowsSystemInfo.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Ryujinx.UI.Common/SystemInfo/WindowsSystemInfo.cs b/src/Ryujinx.UI.Common/SystemInfo/WindowsSystemInfo.cs index 3c469524a..c55591730 100644 --- a/src/Ryujinx.UI.Common/SystemInfo/WindowsSystemInfo.cs +++ b/src/Ryujinx.UI.Common/SystemInfo/WindowsSystemInfo.cs @@ -10,7 +10,7 @@ namespace Ryujinx.UI.Common.SystemInfo { internal WindowsSystemInfo() { - CpuName = $"{GetCpuidCpuName() ?? GetCpuName()} ; {LogicalCoreCount} logical"; + CpuName = $"{GetCpuidCpuName() ?? GetCpuNameFromRegistry()} ; {LogicalCoreCount} logical"; (RamTotal, RamAvailable) = GetMemoryStats(); } @@ -27,13 +27,6 @@ namespace Ryujinx.UI.Common.SystemInfo return (0, 0); } - private static string GetCpuName() - { - string cpuName = GetCpuNameFromRegistry(); - - return !string.IsNullOrEmpty(cpuName) ? cpuName : Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER")?.Trim(); - } - private static string GetCpuNameFromRegistry() { try @@ -46,7 +39,8 @@ namespace Ryujinx.UI.Common.SystemInfo catch (Exception ex) { Logger.Error?.Print(LogClass.Application, $"Registry CPU name lookup failed: {ex.Message}"); - return null; + + return Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER")?.Trim(); } }