cli: add --force-gpu switch

This commit is contained in:
bordun 2020-01-27 08:55:32 +01:00
parent 60cd50f9d5
commit c795c731bb
3 changed files with 8 additions and 0 deletions

View file

@ -12,6 +12,12 @@ if (settings.read('noGpu') || (!settings.cli && settings.read('argv')['disable-g
app.disableHardwareAcceleration()
}
if (settings.read('forceGpu') || (!settings.cli && settings.read('argv')['force-gpu'])) {
app.commandLine.appendSwitch('--ignore-gpu-blacklist')
}
var template = [{
label: 'Edit',
submenu: [

View file

@ -65,6 +65,7 @@ module.exports = {
},
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', restart: true},
'disable-gpu':{type:'boolean',describe:'disable hardware acceleration', restart: true},
'force-gpu':{type:'boolean',describe:'ignore chrome\'s gpu blacklist', restart: true},
'read-only':{type:'boolean',describe:'disable session editing and session history changes',
check: (r, argv)=>{
return (!r || !argv.b) ?

View file

@ -75,6 +75,7 @@ var makeDefaultConfig = function(argv){
urlOptions: argv['url-options'] ? '?' + argv['url-options'].join('&') : '',
noVsync: argv['disable-vsync'] || false,
noGpu: argv['disable-gpu'] || false,
forceGpu: argv['force-gpu'] || false,
readOnly: argv['read-only'] || false,
remoteSaving: argv['remote-saving'] ? RegExp(argv['remote-saving']) : false,
remoteRoot: argv['remote-root'] || false,