From 0b01732293ad54cd1fd12de4f1b451b5c59e3825 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 6 Jan 2024 02:02:54 +0100 Subject: [PATCH] make hardwareAcceleration setting more intuitive --- src/main/index.ts | 4 ++-- src/renderer/components/Settings.tsx | 7 +------ src/shared/settings.d.ts | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 63c5909..ef1892f 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -24,9 +24,9 @@ if (IS_DEV) { process.env.VENCORD_USER_DATA_DIR = DATA_DIR; function init() { - const { disableSmoothScroll, disableHardwareAcceleration } = Settings.store; + const { disableSmoothScroll, hardwareAcceleration } = Settings.store; - if (disableHardwareAcceleration) app.disableHardwareAcceleration(); + if (hardwareAcceleration === false) app.disableHardwareAcceleration(); if (disableSmoothScroll) { app.commandLine.appendSwitch("disable-smooth-scrolling"); } diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index b29fb05..0c22138 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -43,12 +43,7 @@ export default function SettingsUi() { ["staticTitle", "Static Title", 'Makes the window title "Vesktop" instead of changing to the current page'], ["enableMenu", "Enable Menu Bar", "Enables the application menu bar. Press ALT to toggle visibility."], ["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false], - [ - "disableHardwareAcceleration", - "Disable Hardware Acceleration", - "Disables hardware acceleration in Vesktop", - false - ], + ["hardwareAcceleration", "Hardware Acceleration", "Enable hardware acceleration", true], ["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false], [ "openLinksWithElectron", diff --git a/src/shared/settings.d.ts b/src/shared/settings.d.ts index e81c10f..6e5ccfc 100644 --- a/src/shared/settings.d.ts +++ b/src/shared/settings.d.ts @@ -16,7 +16,7 @@ export interface Settings { staticTitle?: boolean; enableMenu?: boolean; disableSmoothScroll?: boolean; - disableHardwareAcceleration?: boolean; + hardwareAcceleration?: boolean; arRPC?: boolean; appBadge?: boolean; discordWindowsTitleBar?: boolean;