From 8abab7689cfe3ca12e24f0ad4499d6508eace992 Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Fri, 21 Jul 2023 20:03:50 -0700 Subject: [PATCH] Forgotten --- src/Ryujinx.Common/SystemInfo/SystemInfo.cs | 31 ++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/Ryujinx.Common/SystemInfo/SystemInfo.cs b/src/Ryujinx.Common/SystemInfo/SystemInfo.cs index 24a745a47..e51747b28 100644 --- a/src/Ryujinx.Common/SystemInfo/SystemInfo.cs +++ b/src/Ryujinx.Common/SystemInfo/SystemInfo.cs @@ -114,23 +114,22 @@ namespace Ryujinx.Common.SystemInfo } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { - var process = new Process + using (var process = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = "sysctl", + Arguments = "-n hw.physicalcpu", + UseShellExecute = false, + RedirectStandardOutput = true, + CreateNoWindow = true, + } + }) { - StartInfo = new ProcessStartInfo - { - FileName = "sysctl", - Arguments = "-n hw.physicalcpu", - UseShellExecute = false, - RedirectStandardOutput = true, - CreateNoWindow = true, - } - }; - - process.Start(); - - coreCount = int.Parse(process.StandardOutput.ReadToEnd()); - - process.WaitForExit(); + process.Start(); + coreCount = int.Parse(process.StandardOutput.ReadToEnd()); + process.WaitForExit(); + } } } catch (Exception ex)