mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 08:43:57 +00:00
18 lines
433 B
TypeScript
18 lines
433 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 game;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
registerEvent("verifyExecutablePathInUse", verifyExecutablePathInUse);
|