Add setting to disable Chromium hardware acceleration (#847)

This commit is contained in:
Evan Simkowitz 2024-09-25 10:08:15 -07:00 committed by GitHub
parent 4d8075d7df
commit 4b665dec90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 8 deletions

View File

@ -852,6 +852,11 @@ async function appMain() {
fs.mkdirSync(waveHomeDir);
}
makeAppMenu();
const fullConfig = await services.FileService.GetFullConfig();
const settings = fullConfig.settings;
if (settings?.["window:disablehardwareacceleration"]) {
electronApp.disableHardwareAcceleration();
}
try {
await runWaveSrv();
} catch (e) {

View File

@ -440,6 +440,7 @@ declare global {
"window:reducedmotion"?: boolean;
"window:tilegapsize"?: number;
"window:nativetitlebar"?: boolean;
"window:disablehardwareacceleration"?: boolean;
"telemetry:*"?: boolean;
"telemetry:enabled"?: boolean;
};

View File

@ -47,6 +47,7 @@ const (
ConfigKey_WindowReducedMotion = "window:reducedmotion"
ConfigKey_WindowTileGapSize = "window:tilegapsize"
ConfigKey_WindowNativeTitleBar = "window:nativetitlebar"
ConfigKey_WindowDisableHardwareAcceleration = "window:disablehardwareacceleration"
ConfigKey_TelemetryClear = "telemetry:*"
ConfigKey_TelemetryEnabled = "telemetry:enabled"

View File

@ -81,6 +81,7 @@ type SettingsType struct {
WindowReducedMotion bool `json:"window:reducedmotion,omitempty"`
WindowTileGapSize *int64 `json:"window:tilegapsize,omitempty"`
WindowNativeTitleBar bool `json:"window:nativetitlebar,omitempty"`
WindowDisableHardwareAcceleration bool `json:"window:disablehardwareacceleration,omitempty"`
TelemetryClear bool `json:"telemetry:*,omitempty"`
TelemetryEnabled bool `json:"telemetry:enabled,omitempty"`