mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
17 lines
434 B
TypeScript
17 lines
434 B
TypeScript
import { registerEvent } from "../register-event";
|
|
import { gamesSublevel } from "@main/level";
|
|
|
|
const verifyExecutablePathInUse = async (
|
|
_event: Electron.IpcMainInvokeEvent,
|
|
executablePath: string
|
|
) => {
|
|
for await (const game of gamesSublevel.values()) {
|
|
if (game.executablePath === executablePath) {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
};
|
|
|
|
registerEvent("verifyExecutablePathInUse", verifyExecutablePathInUse);
|