mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 09:13:57 +00:00
20 lines
438 B
TypeScript
20 lines
438 B
TypeScript
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);
|