fix: support renamed Steam initialization API (#947)

This commit is contained in:
virtudude
2026-07-25 13:30:27 -04:00
committed by GitHub
parent b1ca5e45a6
commit 3e4302e2e5
+11 -2
View File
@@ -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.
}