feat: add custom launch options to game

This commit is contained in:
Davi Souto 2024-12-26 20:43:16 -03:00
parent 83e662f633
commit 520eb91a55
15 changed files with 155 additions and 8 deletions

View file

@ -0,0 +1,19 @@
import { gameRepository } from "@main/repository";
import { registerEvent } from "../register-event";
const updateLaunchOptions = async (
_event: Electron.IpcMainInvokeEvent,
id: number,
launchOptions: string | null
) => {
return gameRepository.update(
{
id,
},
{
launchOptions: launchOptions?.trim() != "" ? launchOptions : null,
}
);
};
registerEvent("updateLaunchOptions", updateLaunchOptions);