add more flags for preventing background unloading
This commit is contained in:
parent
a78dba321d
commit
86aabe73eb
1 changed files with 6 additions and 0 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue