mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-13 06:09:11 +00:00
Forgotten
This commit is contained in:
parent
31c36afc4c
commit
8abab7689c
1 changed files with 15 additions and 16 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue