Files
lhns--steam-frame-nix/modules/dashboard-windows/unpatch.js
T
Pierre Kisters bce51eb598 Add window-curvature: adjustable curvature per dashboard window
steamFrame.dashboard.windowCurvature: the "Toggle Curvature" row of a
window's More Options menu becomes a control (click: curved -> flat,
flat -> stock; drag up/down with the laser: curvature relative to
SteamVR's stock curve, snapping to 0 and 1). The patch moves each frame's
curvature-origin node to stock distance / value in outgoing scene graphs;
per-window values live in the systemui page. Lookups by signature
("window-curvature" in signatures.json, incl. check-only anchors).

Shared method hooks (lib/hooks.js, passed by mkPatch as 4th argument):
one SendMessage wrapper for dashboard-windows (now VERSION 3) and
window-curvature instead of a chain of per-patch wrappers; legacy
wrappers on top are unwound.
2026-09-27 21:30:25 +02:00

17 lines
722 B
JavaScript

// Reverts dashboard-windows/patch.js: removes its SendMessage hook (the
// shared wrapper goes too once no other patch uses it) and resends the scene
// graph, so vrcompositor gets the stock limits again right away. Also
// restores the mailbox SendMessage if VERSION 2's own wrapper is on top.
// Safe when not patched.
(() => {
const NAME = 'dashboard-windows';
const st = window.__sfuiDashboardWindows;
if (!st) return 'not patched';
delete window.__sfuiDashboardWindows;
window.__sfuiHooks?.remove(st.proto, 'SendMessage', NAME);
const f = st.proto.SendMessage;
if (f?.__sfuiPatch === NAME) st.proto.SendMessage = f.__sfuiOrig;
try { st.resend?.(); } catch { /* ignore */ }
return 'unpatched';
})()