feat: remove pslist and use sudo-prompt to close game if needed

This commit is contained in:
Zamitto 2024-07-03 15:29:59 -03:00
parent 0f5db4f34e
commit 1397e3932d
14 changed files with 51 additions and 114 deletions

View file

@ -19,14 +19,13 @@ export const watchProcesses = async () => {
});
if (games.length === 0) return;
const processes = await RPCManager.getProccessList();
const processes = await RPCManager.getProcessList();
for (const game of games) {
const executablePath = game.executablePath!;
const gameProcess = processes.find((runningProcess) => {
return executablePath == runningProcess;
return executablePath == runningProcess.exe;
});
if (gameProcess) {