From a2bdcbeb01eb7bf315fb0d89e919934a927921ab Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 21 Nov 2026 21:45:27 -0500 Subject: feat(vr): add frame stuff (ALPHA) --- frontend/src/index.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'frontend/src/index.ts') diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 162e8f36..f21c4802 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -2,9 +2,9 @@ interface Window { _deckyModuleResolverInternals: { - scopes: Map>, - scopedObjects: Map - } + scopes: Map>; + scopedObjects: Map; + }; } interface SteamAppInitialization { @@ -23,7 +23,7 @@ const isSteamAppInitialized = () => { console.debug('[Decky:Boot] Authenticating with Decky backend...'); window.deckyAuthToken = await fetch('http://127.0.0.1:1337/auth/token').then((r) => r.text()); console.debug('[Decky:Boot] Connecting to Decky backend...'); - const ws = window.DeckyBackend = new (await import('./wsrouter')).WSRouter(); + const ws = (window.DeckyBackend = new (await import('./wsrouter')).WSRouter()); await ws.connect(); console.time('[Decky:Boot] Waiting for SteamApp init stage 1 to finish...'); @@ -35,19 +35,19 @@ const isSteamAppInitialized = () => { console.debug('[Decky:Boot] Setting up Module System & React globals...'); let moduleId = 0; - const int = window._deckyModuleResolverInternals = { + const int = (window._deckyModuleResolverInternals = { scopes: new Map(), - scopedObjects: new Map() - }; - const resolveThroughBackend = ws.callable<[objectKey: number]>("instrumentation/resolve_scope"); + scopedObjects: new Map(), + }); + const resolveThroughBackend = ws.callable<[objectKey: number]>('instrumentation/resolve_scope'); async function resolveModuleScope(objectFromScope: any, moduleForDebug?: string) { let ret; const id = ++moduleId; try { - int.scopedObjects.set(id, objectFromScope) + int.scopedObjects.set(id, objectFromScope); await resolveThroughBackend(id); ret = int.scopes.get(id); - } catch(e) { + } catch (e) { console.debug(`[Decky:Instrumentation] Scope resolution failed for module ${moduleForDebug}`, e); } finally { int.scopes.delete(id); -- cgit v1.2.3