Changes of Linux canary v0.0.77

This commit is contained in:
root 2019-05-08 20:58:57 +02:00
parent 428b668454
commit c51b19e8da

View file

@ -35,12 +35,18 @@ appSettings.init();
const Constants = require('./Constants');
const GPUSettings = require('./GPUSettings');
const settings = appSettings.getSettings();
// TODO: this is a copy of gpuSettings.getEnableHardwareAcceleration
if (!settings.get('enableHardwareAcceleration', true)) {
app.disableHardwareAcceleration();
function setupHardwareAcceleration() {
const settings = appSettings.getSettings();
const electronMajor = parseInt(process.versions.electron.split('.')[0]);
const allowed = process.env.DISCORD_ENABLE_HARDWARE_ACCELERATION || electronMajor < 6;
// TODO: this is a copy of gpuSettings.getEnableHardwareAcceleration
if (!allowed || !settings.get('enableHardwareAcceleration', true)) {
app.disableHardwareAcceleration();
}
}
setupHardwareAcceleration();
// [adill] work around chrome 66 disabling autoplay by default
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');