From d7023a0f3cadb86f9bbb9d66bd171ce9744cb258 Mon Sep 17 00:00:00 2001 From: ran-j Date: Sat, 7 Nov 2020 20:40:44 -0300 Subject: [PATCH] Change path to emulator on linux and windows Disable devtools --- main.js | 3 ++- src/index.js | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 379e7a8..14c9dc3 100644 --- a/main.js +++ b/main.js @@ -12,7 +12,8 @@ function createWindow () { hasShadow: true, webPreferences: { nodeIntegration: true, - enableRemoteModule: true + enableRemoteModule: true, + devTools: false }, // icon: __dirname + 'icon.png' }) diff --git a/src/index.js b/src/index.js index bc8bc91..615b4c4 100644 --- a/src/index.js +++ b/src/index.js @@ -9,7 +9,7 @@ const execProc = require('child_process').exec const defaultsConfig = { gamesPath: 'none', - pcsx2Path: 'C:\\Program Files (x86)\\PCSX2\\pcsx2.exe', + pcsx2Path: 'none', parans: '--fullscreen --nogui', default: true } @@ -84,7 +84,7 @@ var app = new Vue({ } }) resolve(output) - }) + }.bind(this)) }) }, extractCnf(directory, file) { @@ -507,6 +507,16 @@ var app = new Vue({ if(config.gamesPath === 'none') { config.gamesPath = path.join(require('os').homedir(), 'PCSX2/games') } + + if(config.pcsx2Path === 'none') { + const isWin = process.platform === "win32"; + if(isWin) { + config.pcsx2Path = 'C:\\Program Files (x86)\\PCSX2\\pcsx2.exe' + } else { + config.pcsx2Path = '/usr/bin/PCSX2-1.4.0/PCSX2' + } + } + } console.log("Using config", config) this.refreshLibrary()