mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 11:31:58 +00:00
hopefully fix bootloops
This commit is contained in:
@@ -207,7 +207,7 @@ class PluginManager:
|
|||||||
await tab.close_websocket()
|
await tab.close_websocket()
|
||||||
self.js_ctx_tab = None
|
self.js_ctx_tab = None
|
||||||
await restart_webhelper()
|
await restart_webhelper()
|
||||||
await sleep(5)
|
await sleep(1) # To give CEF enough time to close down the websocket
|
||||||
return # We'll catch the next tab in the main loop
|
return # We'll catch the next tab in the main loop
|
||||||
await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => SteamClient.Browser.RestartJSContext(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{await import('http://localhost:1337/frontend/index.js?v=%s')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}" % (get_loader_version(), ), False, False, False)
|
await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => SteamClient.Browser.RestartJSContext(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{await import('http://localhost:1337/frontend/index.js?v=%s')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}" % (get_loader_version(), ), False, False, False)
|
||||||
except:
|
except:
|
||||||
|
|||||||
+13
-1
@@ -6,10 +6,22 @@ interface Window {
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
// Wait for main webpack chunks to definitely be loaded
|
// Wait for main webpack chunks to definitely be loaded
|
||||||
console.debug('[Decky:Boot] Waiting for main Webpack chunks...');
|
console.time('[Decky:Boot] Waiting for main Webpack chunks...');
|
||||||
while (!window.webpackChunksteamui || window.webpackChunksteamui.length < 8) {
|
while (!window.webpackChunksteamui || window.webpackChunksteamui.length < 8) {
|
||||||
await new Promise((r) => setTimeout(r, 10)); // Can't use DFL sleep here.
|
await new Promise((r) => setTimeout(r, 10)); // Can't use DFL sleep here.
|
||||||
}
|
}
|
||||||
|
console.timeEnd('[Decky:Boot] Waiting for main Webpack chunks...');
|
||||||
|
|
||||||
|
// Wait for the React root to be mounted
|
||||||
|
console.time('[Decky:Boot] Waiting for React root mount...');
|
||||||
|
let root;
|
||||||
|
while (
|
||||||
|
!(root = document.getElementById('root')) ||
|
||||||
|
!(root as any)[Object.keys(root).find((k) => k.startsWith('__reactContainer$')) as string]
|
||||||
|
) {
|
||||||
|
await new Promise((r) => setTimeout(r, 10)); // Can't use DFL sleep here.
|
||||||
|
}
|
||||||
|
console.timeEnd('[Decky:Boot] Waiting for React root mount...');
|
||||||
|
|
||||||
if (!window.SP_REACT) {
|
if (!window.SP_REACT) {
|
||||||
console.debug('[Decky:Boot] Setting up Webpack & React globals...');
|
console.debug('[Decky:Boot] Setting up Webpack & React globals...');
|
||||||
|
|||||||
Reference in New Issue
Block a user