mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
16 lines
523 B
TypeScript
16 lines
523 B
TypeScript
import { registerEvent } from "../register-event";
|
|
import type { GameShop } from "@types";
|
|
import { Ludusavi } from "@main/services";
|
|
import { gamesSublevel, levelKeys } from "@main/level";
|
|
|
|
const getGameBackupPreview = async (
|
|
_event: Electron.IpcMainInvokeEvent,
|
|
objectId: string,
|
|
shop: GameShop
|
|
) => {
|
|
const game = await gamesSublevel.get(levelKeys.game(shop, objectId));
|
|
|
|
return Ludusavi.getBackupPreview(shop, objectId, game?.winePrefixPath);
|
|
};
|
|
|
|
registerEvent("getGameBackupPreview", getGameBackupPreview);
|