From 25b567314d42a1906836cf7dc9fe0e38c3996996 Mon Sep 17 00:00:00 2001 From: "lawncable.gitlab@simonlaux.de" Date: Sat, 16 Mar 2019 07:34:53 +0100 Subject: add experimental rich presence --- src/main.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main.ts') diff --git a/src/main.ts b/src/main.ts index 5200d0b..9009b6f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,4 @@ +import * as path from 'path'; import { app, BrowserWindow, ipcMain, remote, Tray, Menu, dialog } from 'electron'; // Keep a global reference of the window object, if you don't, the window will @@ -80,10 +81,10 @@ import {Status, EventEmitter} from './main/status'; -//import {quit as drpcQuit} from './main/richpresence'; +import {quit as drpcQuit} from './main/richpresence'; app.on('quit', () => { - //drpcQuit(); + drpcQuit(); if (appIcon) appIcon.destroy() }); @@ -158,14 +159,13 @@ ManaPlus.init(); ipcMain.on('play', async (event:any, arg:any) => { if(Status.getStatus().playing)return; //console.log("play", arg); + Status.setGameStatus({server: arg.address}) Status.setPlaying(true); await ManaPlus.start(arg); //Status.showError("Failed To Launch Mana Plus","Not implemented yet!","Launch Manaplus faild: Not Implemented"); return false; }); -import * as path from 'path'; - ipcMain.on('dragFileOut', (event:any, filepath:any) => { event.sender.startDrag({ file: filepath, -- cgit v1.2.3-70-g09d2