cli: prevent --disable-gpu from bypassing the launcher
canvas: canvas glitches when hardware acceleration is disabled (--disable-gpu) (built-in gui only)
This commit is contained in:
parent
c2fad00c23
commit
6bded203a8
5 changed files with 20 additions and 6 deletions
|
|
@ -51,13 +51,18 @@ module.exports = function(options={}) {
|
|||
shell.openExternal(url)
|
||||
})
|
||||
|
||||
if (options.fullscreen) {
|
||||
window.webContents.on('dom-ready', ()=>{
|
||||
window.webContents.on('dom-ready', ()=>{
|
||||
if (options.fullscreen) {
|
||||
window.webContents.executeJavaScript(`
|
||||
window.ELECTRON_FULLSCREEN = true
|
||||
`)
|
||||
})
|
||||
}
|
||||
}
|
||||
if (app._noGpu) {
|
||||
window.webContents.executeJavaScript(`
|
||||
window.ELECTRON_NOGPU = true
|
||||
`)
|
||||
}
|
||||
})
|
||||
|
||||
if (options.zoom === false) {
|
||||
window.webContents.setVisualZoomLevelLimits(1, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue