mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 07:00:27 +02:00
Stock, clicking a program in the VR dashboard's "+" menu only calls SteamClient.Apps.LaunchNonSteamApp; the menu stays open until the program's window appears, so users click again and launch it twice. New launch/ patch (SharedJSContext) wraps LaunchNonSteamApp, whose only caller is this menu: closeOnLaunch closes the menu through the "+" bar button's own popup handle right after a launch; launchDebounce ignores repeated launches of the same command line within N seconds (logged to the steam-ui-patches journal). Both opt-in, like the other launcherMenu options.
10 lines
339 B
JavaScript
10 lines
339 B
JavaScript
// Reverts launch/patch.js (restores the original
|
|
// SteamClient.Apps.LaunchNonSteamApp). Safe when not patched.
|
|
(() => {
|
|
const Apps = window.SteamClient?.Apps;
|
|
const f = Apps?.LaunchNonSteamApp;
|
|
if (f?.__sfuiPatch !== 'launcher-menu-launch') return 'not patched';
|
|
Apps.LaunchNonSteamApp = f.__sfuiOrig;
|
|
return 'unpatched';
|
|
})()
|