mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
fix latest beta
VALVEEEEE
This commit is contained in:
+1
-1
@@ -161,7 +161,7 @@ class PluginManager:
|
|||||||
if first:
|
if first:
|
||||||
if await tab.has_global_var("deckyHasLoaded", False):
|
if await tab.has_global_var("deckyHasLoaded", False):
|
||||||
await close_old_tabs()
|
await close_old_tabs()
|
||||||
await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => location.reload(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{while(!window.SP_REACT){await new Promise(r => setTimeout(r, 10))};await import('http://localhost:1337/frontend/index.js')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}", False, False, False)
|
await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => SteamClient.Browser.RestartJSContext(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{while(!window.webpackChunksteamui){await new Promise(r => setTimeout(r, 10))};await import('http://localhost:1337/frontend/index.js')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}", False, False, False)
|
||||||
except:
|
except:
|
||||||
logger.info("Failed to inject JavaScript into tab\n" + format_exc())
|
logger.info("Failed to inject JavaScript into tab\n" + format_exc())
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ class Utilities:
|
|||||||
tab = await get_gamepadui_tab()
|
tab = await get_gamepadui_tab()
|
||||||
self.rdt_script_id = None
|
self.rdt_script_id = None
|
||||||
await close_old_tabs()
|
await close_old_tabs()
|
||||||
await tab.evaluate_js("location.reload();", False, True, False)
|
await tab.evaluate_js("SteamClient.Browser.RestartJSContext();", False, True, False)
|
||||||
self.logger.info("React DevTools disabled")
|
self.logger.info("React DevTools disabled")
|
||||||
|
|
||||||
async def get_user_info(self) -> Dict[str, str]:
|
async def get_user_info(self) -> Dict[str, str]:
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
// Sets up DFL, then loads start.ts which starts up the loader
|
// Sets up DFL, then loads start.ts which starts up the loader
|
||||||
(async () => {
|
(async () => {
|
||||||
|
if (!window.SP_REACT) {
|
||||||
|
console.debug('Setting up React globals...');
|
||||||
|
// deliberate partial import
|
||||||
|
const DFLWebpack = await import('decky-frontend-lib/dist/webpack');
|
||||||
|
// TODO move these finds to dfl in v4
|
||||||
|
window.SP_REACT = DFLWebpack.findModule((m) => m.Component && m.PureComponent && m.useLayoutEffect);
|
||||||
|
window.SP_REACTDOM = DFLWebpack.findModule((m) => m.createPortal && m.createRoot);
|
||||||
|
}
|
||||||
console.debug('Setting up decky-frontend-lib...');
|
console.debug('Setting up decky-frontend-lib...');
|
||||||
window.DFL = await import('decky-frontend-lib');
|
window.DFL = await import('decky-frontend-lib');
|
||||||
await import('./start');
|
await import('./start');
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import reloadFix from './reload';
|
// import reloadFix from './reload';
|
||||||
import restartFix from './restart';
|
import restartFix from './restart';
|
||||||
let fixes: Function[] = [];
|
let fixes: Function[] = [];
|
||||||
|
|
||||||
@@ -7,6 +7,6 @@ export function deinitSteamFixes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function initSteamFixes() {
|
export async function initSteamFixes() {
|
||||||
fixes.push(await reloadFix());
|
// fixes.push(await reloadFix());
|
||||||
fixes.push(await restartFix());
|
fixes.push(await restartFix());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user