main: read-only mode (disables, editor and session history)

This commit is contained in:
jean-emmanuel 2017-03-21 08:19:21 +01:00
parent f8b8a566c5
commit 0899f5bc5e
9 changed files with 73 additions and 23 deletions

View file

@ -50,7 +50,13 @@ var options = {
true : 'examples can\'t be listed if --load is set'
}
},
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', restart: true}
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', restart: true},
'read-only':{type:'boolean',describe:'disable session editing',
check: (r, argv)=>{
return (!argv.b) ?
true : 'blank session can\'t be started in read-only mode'
}
},
}
@ -95,6 +101,7 @@ var makeDefaultConfig = function(argv){
noGui: argv.n || false,
guiOnly: typeof argv.g == 'string' ? argv.g.length ? argv.g : true : false,
noVsync: argv['disable-vsync'] || false,
readOnly: argv['read-only'] || false,
midi: argv.m,
appAddresses:function(){
var appAddresses = []