From da0cbd606925edf41fd588c95575242c067cd115 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 7 Apr 2024 16:18:43 -0400 Subject: [PATCH] fix(ags gsr): add timeout before starting gsr --- modules/ags/config/binto.ts | 4 +++- modules/ags/config/services/gpu-screen-recorder.ts | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ags/config/binto.ts b/modules/ags/config/binto.ts index de42c29..e66d6d3 100644 --- a/modules/ags/config/binto.ts +++ b/modules/ags/config/binto.ts @@ -17,7 +17,9 @@ App.config({ Brightness.capsName = 'input30::capslock'; globalThis.Brightness = Brightness; globalThis.Pointers = Pointers; - globalThis.GSR = GSR; + setTimeout(() => { + globalThis.GSR = new GSR(); + }, 1000); }, windows: () => [ diff --git a/modules/ags/config/services/gpu-screen-recorder.ts b/modules/ags/config/services/gpu-screen-recorder.ts index 6310633..da11429 100644 --- a/modules/ags/config/services/gpu-screen-recorder.ts +++ b/modules/ags/config/services/gpu-screen-recorder.ts @@ -65,10 +65,8 @@ class GSR extends Service { {}, Notifications.popupTimeout, ); - }); + }).catch(logError); } } -const gsrService = new GSR(); - -export default gsrService; +export default GSR;