|
|
@ -140,8 +140,14 @@ if (!IS_VANILLA) {
|
|
|
|
return originalAppend.apply(this, args);
|
|
|
|
return originalAppend.apply(this, args);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// disable renderer backgrounding to prevent the app from unloading when in the background
|
|
|
|
|
|
|
|
// https://github.com/electron/electron/issues/2822
|
|
|
|
|
|
|
|
// https://github.com/GoogleChrome/chrome-launcher/blob/5a27dd574d47a75fec0fb50f7b774ebf8a9791ba/docs/chrome-flags-for-tools.md#task-throttling
|
|
|
|
// Work around discord unloading when in background
|
|
|
|
// Work around discord unloading when in background
|
|
|
|
|
|
|
|
// Discord also recently started adding these flags but only on windows for some reason dunno why, it happens on Linux too
|
|
|
|
app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
|
|
|
app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
|
|
|
|
|
|
|
app.commandLine.appendSwitch("disable-background-timer-throttling");
|
|
|
|
|
|
|
|
app.commandLine.appendSwitch("disable-backgrounding-occluded-windows");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
|
|
|
|
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
|
|
|
|
}
|
|
|
|
}
|
|
|
|