Changes of Linux canary v0.0.77
This commit is contained in:
parent
428b668454
commit
c51b19e8da
1 changed files with 10 additions and 4 deletions
14
appasar/canary/app_bootstrap/bootstrap.js
vendored
14
appasar/canary/app_bootstrap/bootstrap.js
vendored
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in a new issue