From 166c7ea8a7ea74d9a61d84ebe16556cec9e7cc83 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Tue, 6 Aug 2024 23:25:39 -0400 Subject: Work around account switching failing to open the CEF debugger socket (#668) * Work around account switching failing to open the CEF debugger socket this automates lsof and gdb to force close the socket before steam finishes shutting down (from RegisterForShutdownStart) * lint * fix LD_LIBRARY_PATH for gdb --- frontend/src/steamfixes/socket.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/src/steamfixes/socket.ts (limited to 'frontend/src/steamfixes/socket.ts') diff --git a/frontend/src/steamfixes/socket.ts b/frontend/src/steamfixes/socket.ts new file mode 100644 index 00000000..26f6afee --- /dev/null +++ b/frontend/src/steamfixes/socket.ts @@ -0,0 +1,16 @@ +import Logger from '../logger'; + +const logger = new Logger('CEFSocketFix'); + +const closeCEFSocket = DeckyBackend.callable<[], void>('utilities/close_cef_socket'); + +export default function cefSocketFix() { + const reg = window.SteamClient?.User?.RegisterForShutdownStart(async () => { + logger.log('Closing CEF socket before shutdown'); + await closeCEFSocket(); + }); + + if (reg) logger.debug('CEF shutdown handler ready'); + + return () => reg?.unregister(); +} -- cgit v1.2.3