Files
hydra/src/main/events/library/open-game.ts
Chubby Granny Chaser dc7591ee28 feat: removing sentry
2024-05-14 16:54:14 +01:00

17 lines
395 B
TypeScript

import { gameRepository } from "@main/repository";
import { registerEvent } from "../register-event";
import { shell } from "electron";
const openGame = async (
_event: Electron.IpcMainInvokeEvent,
gameId: number,
executablePath: string
) => {
await gameRepository.update({ id: gameId }, { executablePath });
shell.openPath(executablePath);
};
registerEvent("openGame", openGame);