mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Fix Electron checking if game is running
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user