diff options
| author | AAGaming <aagaming@riseup.net> | 2026-11-21 21:45:27 -0500 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2026-11-21 21:45:27 -0500 |
| commit | a2bdcbeb01eb7bf315fb0d89e919934a927921ab (patch) | |
| tree | f72bd5ab6abe22a30262b55ea81fa07efcb58e9e /frontend/src/hooks | |
| parent | fc0355f55d8d36826466fc304d6ecb254d4b7ca1 (diff) | |
| download | decky-loader-a2bdcbeb01eb7bf315fb0d89e919934a927921ab.tar.gz decky-loader-a2bdcbeb01eb7bf315fb0d89e919934a927921ab.zip | |
feat(vr): add frame stuff (ALPHA)
Diffstat (limited to 'frontend/src/hooks')
| -rw-r--r-- | frontend/src/hooks/router.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/hooks/vr-dashboard-bar.tsx | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/frontend/src/hooks/router.tsx b/frontend/src/hooks/router.tsx index bb1bfdba..0c8eb01a 100644 --- a/frontend/src/hooks/router.tsx +++ b/frontend/src/hooks/router.tsx @@ -56,7 +56,7 @@ class RouterHook extends Logger { window.__ROUTER_HOOK_INSTANCE?.deinit?.(); window.__ROUTER_HOOK_INSTANCE = this; - this.Route = findVar((e) => /routePath:[\w$]+\.match\?\.path./.test(e.toString())) + this.Route = findVar((e) => /routePath:[\w$]+\.match\?\.path./.test(e.toString())); if (!this.Route) { this.error('Failed to find Route component'); } diff --git a/frontend/src/hooks/vr-dashboard-bar.tsx b/frontend/src/hooks/vr-dashboard-bar.tsx index 905aee03..3fe1ad73 100644 --- a/frontend/src/hooks/vr-dashboard-bar.tsx +++ b/frontend/src/hooks/vr-dashboard-bar.tsx @@ -1,5 +1,5 @@ // Hook the SteamVR Hotbar -import { ErrorBoundary, Patch, afterPatch, findInReactTree, findModuleExport, getReactRoot } from '@decky/ui'; +import { ErrorBoundary, Patch, afterPatch, findInReactTree, findVar, getReactRoot } from '@decky/ui'; import { ReactNode, createElement } from 'react'; import Logger from '../logger'; @@ -41,8 +41,8 @@ class VRDashboardBarHook extends Logger { } init() { - this.barButton = findModuleExport((e) => e?.render?.toString()?.includes('VRDashboardBarSmallButtonActive')); - const barComponent = findModuleExport((e) => e?.type?.toString()?.includes('vrLocation=="dashboard-bar"')); + this.barButton = findVar((e) => e?.render?.toString()?.includes('VRDashboardBarSmallButtonActive')); + const barComponent = findVar((e) => e?.type?.toString()?.includes('vrLocation==`dashboard-bar`')); this.barPatch = afterPatch(barComponent, 'type', (_, ret) => { const nodes = findInReactTree(ret, (x) => x?.length > 6); @@ -51,6 +51,7 @@ class VRDashboardBarHook extends Logger { }); // Patch already rendered bar + // THIS DOES NOT WORK so frame needs a lockscreen for now :/ const root = getReactRoot(document.getElementById('root') as any); const barNode = root && |
