diff options
| author | virtudude <virtudude@protonmail.com> | 2026-07-25 13:30:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-25 13:30:27 -0400 |
| commit | 3e4302e2e58f39d6289d95a64edbb931f3831668 (patch) | |
| tree | dde74b2513b9b00f4821fd5d69760521b8d09e85 /frontend | |
| parent | b1ca5e45a6b7c31d4ebababb7333fb4ac8bd121e (diff) | |
| download | decky-loader-3.2.8-pre1.tar.gz decky-loader-3.2.8-pre1.zip | |
fix: support renamed Steam initialization API (#947)HEADv3.2.8-pre1main
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/src/index.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 7ef5087f..67b30d15 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -1,12 +1,21 @@ // Sets up DFL, then loads start.ts which starts up the loader +interface SteamAppInitialization { + BFinishedInitBeforeLogin?: () => boolean; + BFinishedInitStageOne?: () => boolean; +} + +const isSteamAppInitialized = () => { + const app = window.App as unknown as SteamAppInitialization | undefined; + return app?.BFinishedInitBeforeLogin?.() ?? app?.BFinishedInitStageOne?.() ?? false; +}; + (async () => { console.debug('[Decky:Boot] Frontend init'); console.time('[Decky:Boot] Waiting for SteamApp init stage 1 to finish...'); - // @ts-expect-error TODO type BFinishedInitStageOne in @decky/ui - while (!window.App?.BFinishedInitStageOne()) { + while (!isSteamAppInitialized()) { await new Promise((r) => setTimeout(r, 0)); // Can't use DFL sleep here. } |
