aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 15:12:14 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 15:12:14 +0200
commit199f6763c946a044a28077cf8aa131f29af83868 (patch)
tree6743fae240e7b36cd68789267ca23877f3ac6f0a /src/index.js
parentmini cleanup (diff)
downloadferdium-app-199f6763c946a044a28077cf8aa131f29af83868.tar.gz
ferdium-app-199f6763c946a044a28077cf8aa131f29af83868.tar.zst
ferdium-app-199f6763c946a044a28077cf8aa131f29af83868.zip
feature(App): Add option to disable GPU acceleration
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
index 897943a85..5ba901b89 100644
--- a/src/index.js
+++ b/src/index.js
@@ -12,6 +12,8 @@ import handleDeepLink from './electron/deepLinking';
12import { appId } from './package.json'; // eslint-disable-line import/no-unresolved 12import { appId } from './package.json'; // eslint-disable-line import/no-unresolved
13import './electron/exception'; 13import './electron/exception';
14 14
15const debug = require('debug')('App');
16
15// Keep a global reference of the window object, if you don't, the window will 17// Keep a global reference of the window object, if you don't, the window will
16// be closed automatically when the JavaScript object is garbage collected. 18// be closed automatically when the JavaScript object is garbage collected.
17let mainWindow; 19let mainWindow;
@@ -57,6 +59,12 @@ if (isLinux && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESK
57// Initialize Settings 59// Initialize Settings
58const settings = new Settings(); 60const settings = new Settings();
59 61
62// Disable GPU acceleration
63if (!settings.get('enableGPUAcceleration')) {
64 debug('Disable GPU Acceleration');
65 app.disableHardwareAcceleration();
66}
67
60const createWindow = () => { 68const createWindow = () => {
61 // Remember window size 69 // Remember window size
62 const mainWindowState = windowStateKeeper({ 70 const mainWindowState = windowStateKeeper({