Remove speech dispatcher flag as it causes issues
On some systems, the dispatcher thread can generate many coredumps if no backend is configured. Users should manually enable this if they want it This commit also removes an obsolete flag and refactors a bit of code to be compatible with older Electron versions. This will allow people to build it with older Electron versions that still support older OS versions.
This commit is contained in:
+3
-8
@@ -62,16 +62,11 @@ function init() {
|
|||||||
// work around chrome 66 disabling autoplay by default
|
// work around chrome 66 disabling autoplay by default
|
||||||
app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");
|
app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");
|
||||||
|
|
||||||
// WinRetrieveSuggestionsOnlyOnDemand: Work around electron 13 bug w/ async spellchecking on Windows.
|
// Prevent Discord from registering as a media service.
|
||||||
// HardwareMediaKeyHandling, MediaSessionService: Prevent Discord from registering as a media service.
|
|
||||||
disabledFeatures.add("WinRetrieveSuggestionsOnlyOnDemand");
|
|
||||||
disabledFeatures.add("HardwareMediaKeyHandling");
|
disabledFeatures.add("HardwareMediaKeyHandling");
|
||||||
disabledFeatures.add("MediaSessionService");
|
disabledFeatures.add("MediaSessionService");
|
||||||
|
|
||||||
if (isLinux) {
|
if (isLinux) {
|
||||||
// Support TTS on Linux using https://wiki.archlinux.org/title/Speech_dispatcher
|
|
||||||
app.commandLine.appendSwitch("enable-speech-dispatcher");
|
|
||||||
|
|
||||||
// This is needed to fix washed out colours - https://github.com/electron/electron/issues/49566
|
// This is needed to fix washed out colours - https://github.com/electron/electron/issues/49566
|
||||||
// Supposed to be fixed already according to comments there, but it's just not lol, I can repro on Electron 43.0.0
|
// Supposed to be fixed already according to comments there, but it's just not lol, I can repro on Electron 43.0.0
|
||||||
// when moving the window from my main monitor (HDR - not sure if this is relevant lol) to second monitor (SDR) and back
|
// when moving the window from my main monitor (HDR - not sure if this is relevant lol) to second monitor (SDR) and back
|
||||||
@@ -80,8 +75,8 @@ function init() {
|
|||||||
|
|
||||||
disabledFeatures.forEach(feat => enabledFeatures.delete(feat));
|
disabledFeatures.forEach(feat => enabledFeatures.delete(feat));
|
||||||
|
|
||||||
const enabledFeaturesArray = enabledFeatures.values().filter(Boolean).toArray();
|
const enabledFeaturesArray = [...enabledFeatures].filter(Boolean);
|
||||||
const disabledFeaturesArray = disabledFeatures.values().filter(Boolean).toArray();
|
const disabledFeaturesArray = [...disabledFeatures].filter(Boolean);
|
||||||
|
|
||||||
if (enabledFeaturesArray.length) {
|
if (enabledFeaturesArray.length) {
|
||||||
app.commandLine.appendSwitch("enable-features", enabledFeaturesArray.join(","));
|
app.commandLine.appendSwitch("enable-features", enabledFeaturesArray.join(","));
|
||||||
|
|||||||
Reference in New Issue
Block a user