summaryrefslogtreecommitdiff
path: root/frontend/src/steamfixes
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-08-06 23:25:39 -0400
committerGitHub <noreply@github.com>2024-08-06 20:25:39 -0700
commit166c7ea8a7ea74d9a61d84ebe16556cec9e7cc83 (patch)
tree884b3ec5e5bb4e11189eb0cc865b4896421af450 /frontend/src/steamfixes
parentddc807340c6d65949c5ddcd665c77beb79edb38e (diff)
downloaddecky-loader-166c7ea8a7ea74d9a61d84ebe16556cec9e7cc83.tar.gz
decky-loader-166c7ea8a7ea74d9a61d84ebe16556cec9e7cc83.zip
Work around account switching failing to open the CEF debugger socket (#668)v3.0.0-pre6
* 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
Diffstat (limited to 'frontend/src/steamfixes')
-rw-r--r--frontend/src/steamfixes/index.ts9
-rw-r--r--frontend/src/steamfixes/socket.ts16
2 files changed, 21 insertions, 4 deletions
diff --git a/frontend/src/steamfixes/index.ts b/frontend/src/steamfixes/index.ts
index e3f2b284..3b3ee75f 100644
--- a/frontend/src/steamfixes/index.ts
+++ b/frontend/src/steamfixes/index.ts
@@ -1,5 +1,6 @@
-// import reloadFix from './reload';
-import restartFix from './restart';
+// import restartFix from './restart';
+import cefSocketFix from './socket';
+
let fixes: Function[] = [];
export function deinitSteamFixes() {
@@ -7,6 +8,6 @@ export function deinitSteamFixes() {
}
export async function initSteamFixes() {
- // fixes.push(await reloadFix());
- fixes.push(await restartFix());
+ fixes.push(cefSocketFix());
+ // fixes.push(await restartFix());
}
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();
+}