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

@@ -288,7 +288,12 @@ namespace VRCX
try
{
var processName = Path.GetFileNameWithoutExtension(filePath);
return Process.GetProcessesByName(processName).Length != 0;
var processes = Process.GetProcessesByName(processName);
var isProcessRunning = processes.Length != 0;
foreach (var process in processes)
process.Dispose();
return isProcessRunning;
}
catch (Exception ex)
{