cli: move novsync cli setting check so that it can be read from user config file
This commit is contained in:
parent
d68583b4ef
commit
047b882bd7
2 changed files with 8 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
var shortcut = require('electron-localshortcut'),
|
||||
{app, dialog} = require('electron')
|
||||
|
||||
var {app, dialog} = require('electron'),
|
||||
settings = require('./settings')
|
||||
|
||||
dialog.showErrorBox = function(title,err) {
|
||||
console.log(title + ': ' + err)
|
||||
}
|
||||
|
|
@ -8,6 +8,11 @@ dialog.showErrorBox = function(title,err) {
|
|||
app.commandLine.appendSwitch('--enable-touch-events')
|
||||
|
||||
|
||||
if (settings.read('noVsync')) {
|
||||
app.commandLine.appendSwitch('--disable-gpu-vsync')
|
||||
}
|
||||
|
||||
|
||||
app.on('window-all-closed', function() {
|
||||
if (process.platform != 'darwin') {
|
||||
app.quit()
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@ var start = function(readyApp) {
|
|||
var app = require('./electron-app')
|
||||
var address = typeof settings.read('guiOnly')=='string'? 'http://' + settings.read('guiOnly') : settings.read('appAddresses')[0]
|
||||
|
||||
if (settings.read('noVsync')) {
|
||||
app.commandLine.appendSwitch('--disable-gpu-vsync')
|
||||
}
|
||||
|
||||
if (app.isReady()) {
|
||||
return require('./electron-window')({address:address, shortcuts:true})
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue