From 81377d36573fe3cf13329377eed2f3dfce0c4057 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 10 Jun 2022 20:24:13 +0200 Subject: [PATCH] Add performance mode --- src/content/setup.html | 3 +++ src/main.ts | 5 +++-- src/settings/settings.html | 11 +++++++++- src/utils.ts | 41 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/src/content/setup.html b/src/content/setup.html index 6ed4c94..4b9d4bd 100644 --- a/src/content/setup.html +++ b/src/content/setup.html @@ -101,6 +101,7 @@ automaticPatches: false, mods: "cumcord", inviteWebsocket: true, + performanceMode: "none", blurType: "acrylic" }); setTimeout(() => window.armcordinternal.restart(), 5000); @@ -130,6 +131,7 @@ autoLaunch: true, minimizeToTray: true, automaticPatches: false, + performanceMode: "none", mods: options.mod, inviteWebsocket: true, blurType: "acrylic" @@ -145,6 +147,7 @@ automaticPatches: false, autoLaunch: true, mods: "none", + performanceMode: "none", inviteWebsocket: true, blurType: "acrylic" }); diff --git a/src/main.ts b/src/main.ts index ec61b77..8d1abb9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ // Modules to control application life and create native browser window import {app, BrowserWindow, session, dialog} from "electron"; import "v8-compile-cache"; -import {getConfig, setup, checkIfConfigExists} from "./utils"; +import {getConfig, setup, checkIfConfigExists, injectElectronFlags} from "./utils"; import "./extensions/mods"; import "./extensions/plugin"; import "./tray"; @@ -12,6 +12,7 @@ export var settings: any; export var customTitlebar: boolean; export var tabs: boolean; + if (process.platform == "linux") { if (process.env.$XDG_SESSION_TYPE == "wayland") { console.log("Wayland specific patches applied."); @@ -24,7 +25,7 @@ if (process.platform == "linux") { } } checkIfConfigExists(); - +injectElectronFlags(); app.whenReady().then(async () => { switch (await getConfig("windowStyle")) { case "default": diff --git a/src/settings/settings.html b/src/settings/settings.html index 7d723c5..c57151c 100644 --- a/src/settings/settings.html +++ b/src/settings/settings.html @@ -58,7 +58,14 @@
Client mod:
- +Performance mode:
+