bloodymary/app/GPUSettings.js
2020-08-06 12:54:20 +00:00

26 lines
No EOL
723 B
JavaScript

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getEnableHardwareAcceleration = getEnableHardwareAcceleration;
exports.setEnableHardwareAcceleration = setEnableHardwareAcceleration;
var _electron = require('electron');
var _appSettings = require('./appSettings');
const settings = (0, _appSettings.getSettings)();
function getEnableHardwareAcceleration() {
// TODO: This should probably a constant
return settings.get('enableHardwareAcceleration', true);
}
function setEnableHardwareAcceleration(enableHardwareAcceleration) {
settings.set('enableHardwareAcceleration', enableHardwareAcceleration);
settings.save();
_electron.app.relaunch();
_electron.app.exit(0);
}