launcher: make it possible to set vsync from launcher by telling if the app must be restarted
This commit is contained in:
parent
56ec3bc7d5
commit
9bdeb3a712
5 changed files with 17 additions and 7 deletions
|
|
@ -81,6 +81,14 @@ $(document).ready(()=>{
|
|||
argv[i] = v
|
||||
}
|
||||
|
||||
if (option.restart && v!=value && !wrapper.hasClass('restart')) {
|
||||
wrapper.addClass('restart')
|
||||
wrapper.append(`<div class="restart-msg">The app must be restarted for this change to take effect.</div>`)
|
||||
} else if (option.restart && wrapper.hasClass('restart')) {
|
||||
wrapper.removeClass('restart')
|
||||
wrapper.find('.restart-msg').remove()
|
||||
}
|
||||
|
||||
if (!stop) $('input').not(input).trigger('change',true)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ if (cli) {
|
|||
launcher
|
||||
|
||||
app.on('ready',function(){
|
||||
launcher = require('./electron-window')({address:address, shortcuts:false, width:600, height:452})
|
||||
launcher = require('./electron-window')({address:address, shortcuts:false, width:600, height:482})
|
||||
})
|
||||
|
||||
ipcMain.on('start',function(e, options){
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ var options = {
|
|||
true : 'examples can\'t be listed if --load is set'
|
||||
}
|
||||
},
|
||||
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', launcher: false}
|
||||
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', restart: true}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue