Skip to content

Commit

Permalink
fix: high CPU usage (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyset0 authored Dec 29, 2023
1 parent e455bf1 commit 29f8a92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dalamud.Updater/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,11 @@ private void InitializePIDCheck()
//为什么我开了FF检测不到啊.jpg
var newPidList = Process.GetProcesses().Where(process =>
{
var isFfxivProcess = process.ProcessName == "ffxiv_dx11" || process.ProcessName == "ffxiv";
var isSdoClient = !process.MainWindowTitle.Contains("FINAL FANTASY XIV");
return isFfxivProcess && isSdoClient;
if (process.ProcessName == "ffxiv_dx11" || process.ProcessName == "ffxiv")
{
return !process.MainWindowTitle.Contains("FINAL FANTASY XIV");
}
return false;
}).ToList().ConvertAll(process => process.Id.ToString()).ToArray();
var newHash = String.Join(", ", newPidList).GetHashCode();
var oldPidList = this.comboBoxFFXIV.Items.Cast<Object>().Select(item => item.ToString()).ToArray();
Expand Down

0 comments on commit 29f8a92

Please sign in to comment.