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