From d5abf7ea9551d347d17633ae3dcdb1009d50a3fd Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Wed, 25 Sep 2024 13:46:13 -0700 Subject: [PATCH] Move settings check after wavesrv startup (#854) --- emain/emain.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/emain/emain.ts b/emain/emain.ts index 1e0327579..f951e97df 100644 --- a/emain/emain.ts +++ b/emain/emain.ts @@ -852,11 +852,7 @@ 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) { @@ -864,6 +860,14 @@ async function appMain() { } const ready = await waveSrvReady; console.log("wavesrv ready signal received", ready, Date.now() - startTs, "ms"); + + const fullConfig = await services.FileService.GetFullConfig(); + const settings = fullConfig.settings; + if (settings?.["window:disablehardwareacceleration"]) { + console.log("disabling hardware acceleration"); + electronApp.disableHardwareAcceleration(); + } + await electronApp.whenReady(); configureAuthKeyRequestInjection(electron.session.defaultSession); await relaunchBrowserWindows();