Files
lhns--steam-frame-nix/modules/dashboard-windows/unpatch.js
T
Pierre Kisters 9f5538003f Add dashboard-windows (resize/grab-distance limits) and steamvr-debugger
dashboard-windows: steamFrame.dashboard.windowMaxScale and
windowDistance.{world,theater,dashboard}.{min,max}, one runtime patch of the
SteamVR dashboard (systemui, 127.0.0.1:8087) that rewrites
frame-resize-scale-max and grab min/max-distance in the scene graph sent to
vrcompositor, then asks for one resend so changes apply immediately.
Registered only when an option is set. The mailbox class and the
scene-graph scheduler are found by signature (mkPatch, "dashboard-windows"
in lib/signatures.json, bundle vrwebui-systemui), so
scripts/check-signatures.mjs checks them offline too.

steamvr-debugger: steamFrame.steamvrDebugger.enable, defaulting to true when
a UI patch uses port 8087; merges VRWebHelper.DebuggerEnabled into
steamvr.vrsettings before every SteamVR start, and reverts it (only if it
set it) when turned off.
2026-09-27 20:09:47 +02:00

16 lines
672 B
JavaScript

// Reverts dashboard-windows/patch.js: restores the mailbox SendMessage and
// resends the scene graph, so vrcompositor gets the stock limits again right
// away. If something else has wrapped SendMessage since, our wrapper stays in
// its chain but is inert (it looks the rewrite up in the removed state).
// Safe when not patched.
(() => {
const NAME = 'dashboard-windows';
const st = window.__sfuiDashboardWindows;
if (!st) return 'not patched';
delete window.__sfuiDashboardWindows;
const f = st.proto.SendMessage;
if (f?.__sfuiPatch === NAME) st.proto.SendMessage = f.__sfuiOrig;
try { st.resend?.(); } catch { /* ignore */ }
return 'unpatched';
})()