added new env var ELECTRON_DISABLE_GPU which disable gpu under electron if set (fixes #2831).

This commit is contained in:
Karsten Hassel
2022-03-29 20:38:45 +02:00
parent 612b06346d
commit 00a7c6b5be
2 changed files with 5 additions and 0 deletions

View File

@@ -8,6 +8,10 @@ const Log = require("logger");
let config = process.env.config ? JSON.parse(process.env.config) : {};
// Module to control application life.
const app = electron.app;
if (process.env.ELECTRON_DISABLE_GPU !== undefined) {
app.disableHardwareAcceleration();
}
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;