Fix Electron checking if game is running

This commit is contained in:
Natsumi
2025-10-31 01:51:26 +11:00
parent f434c83b0c
commit 27464ca65f
4 changed files with 25 additions and 5 deletions

View File

@@ -120,7 +120,14 @@ namespace VRCX
return false;
if (ensureCheck && process.Process == null)
return Process.GetProcessesByName(processName).FirstOrDefault() != null;
{
var processes = Process.GetProcessesByName(processName);
var isProcessRunning = processes.Length > 0;
foreach (var proc in processes)
proc.Dispose();
return isProcessRunning;
}
return process.IsRunning;