mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 04:05:04 +03:00
Fixes for march 19th 2026 beta (#890)
Builder Win / Build PluginLoader for Win (push) Has been cancelled
Builder / Build PluginLoader (push) Has been cancelled
Push Updated Plugin Stub to Template / copy-stub (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Type Check / Run type checkers (push) Has been cancelled
Builder Win / Build PluginLoader for Win (push) Has been cancelled
Builder / Build PluginLoader (push) Has been cancelled
Push Updated Plugin Stub to Template / copy-stub (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Type Check / Run type checkers (push) Has been cancelled
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@decky/ui": "^4.11.1",
|
||||
"@decky/ui": "^4.11.2",
|
||||
"compare-versions": "^6.1.1",
|
||||
"filesize": "^10.1.2",
|
||||
"i18next": "^25.6.0",
|
||||
|
||||
Generated
+5
-5
@@ -9,8 +9,8 @@ importers:
|
||||
.:
|
||||
dependencies:
|
||||
'@decky/ui':
|
||||
specifier: ^4.11.1
|
||||
version: 4.11.1
|
||||
specifier: ^4.11.2
|
||||
version: 4.11.2
|
||||
compare-versions:
|
||||
specifier: ^6.1.1
|
||||
version: 6.1.1
|
||||
@@ -222,8 +222,8 @@ packages:
|
||||
'@decky/api@1.1.3':
|
||||
resolution: {integrity: sha512-XsPCZxfxk5I1UtylIUN3qaWQI31siQbKfbLIskkI5innEatY1m4NQqBv/6hwPaO9mKMbdqYpnh5PSJDeMEOOBA==}
|
||||
|
||||
'@decky/ui@4.11.1':
|
||||
resolution: {integrity: sha512-+x+rJB0MBQSQGp0UpsRJ4BOv7zlHzcBPT76enopjGf56H41beR8VZua9F4upLtDgPku4Zh8z3uB53nFlvTilXQ==}
|
||||
'@decky/ui@4.11.2':
|
||||
resolution: {integrity: sha512-IHwgy37DZLdRK8XUHF1Eoss/sTCcW/g/fmE4Wd3EKyQjJAbM5385wMUxzZqcE5MNC6TsdAKTa941m0n5flSOxw==}
|
||||
|
||||
'@esbuild/aix-ppc64@0.20.2':
|
||||
resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==}
|
||||
@@ -2311,7 +2311,7 @@ snapshots:
|
||||
|
||||
'@decky/api@1.1.3': {}
|
||||
|
||||
'@decky/ui@4.11.1': {}
|
||||
'@decky/ui@4.11.2': {}
|
||||
|
||||
'@esbuild/aix-ppc64@0.20.2':
|
||||
optional: true
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
DFLWebpack.findModule((m) => m.createPortal && m.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE);
|
||||
|
||||
console.debug('[Decky:Boot] Setting up JSX internals...');
|
||||
const jsx = DFLWebpack.findModule((m) => m.jsx && Object.keys(m).length == 1)?.jsx;
|
||||
if (jsx) {
|
||||
const jsxModule = DFLWebpack.findModule((m) => (m.jsx && m.jsxs) || (m.jsx && Object.keys(m).length == 1));
|
||||
if (jsxModule.jsxs) {
|
||||
window.SP_JSX = jsxModule;
|
||||
} else {
|
||||
window.SP_JSX = {
|
||||
jsx,
|
||||
jsxs: jsx,
|
||||
jsx: jsxModule.jsx,
|
||||
jsxs: jsxModule.jsx,
|
||||
Fragment: window.SP_REACT.Fragment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ interface Tab {
|
||||
class TabsHook extends Logger {
|
||||
// private keys = 7;
|
||||
tabs: Tab[] = [];
|
||||
private qamPatch?: Patch;
|
||||
private qamBrowserViewPatch?: Patch;
|
||||
private qamEmbeddedPatch?: Patch;
|
||||
|
||||
constructor() {
|
||||
super('TabsHook');
|
||||
@@ -40,11 +41,13 @@ class TabsHook extends Logger {
|
||||
}
|
||||
|
||||
init() {
|
||||
// TODO patch the "embedded" renderer in this module too (seems to be for VR? unsure)
|
||||
const qamModule = findModuleByExport((e) => e?.type?.toString?.()?.includes('QuickAccessMenuBrowserView'));
|
||||
const qamRenderer = Object.values(qamModule).find((e: any) =>
|
||||
const qamBrowserViewRenderer = Object.values(qamModule).find((e: any) =>
|
||||
e?.type?.toString?.()?.includes('QuickAccessMenuBrowserView'),
|
||||
);
|
||||
const qamEmbeddedRenderer = Object.values(qamModule).find((e: any) =>
|
||||
e?.type?.toString?.()?.includes('QuickAccessMenuEmbedded'),
|
||||
);
|
||||
|
||||
const patchHandler = createReactTreePatcher(
|
||||
[(tree) => findInReactTree(tree, (node) => node?.props?.onFocusNavDeactivated)],
|
||||
@@ -56,12 +59,21 @@ class TabsHook extends Logger {
|
||||
'TabsHook',
|
||||
);
|
||||
|
||||
this.qamPatch = afterPatch(qamRenderer, 'type', patchHandler);
|
||||
this.qamBrowserViewPatch = afterPatch(qamBrowserViewRenderer, 'type', patchHandler);
|
||||
if (qamEmbeddedRenderer) this.qamEmbeddedPatch = afterPatch(qamEmbeddedRenderer, 'type', patchHandler);
|
||||
|
||||
// Patch already rendered qam
|
||||
const root = getReactRoot(document.getElementById('root') as any);
|
||||
const qamNode = root && findInReactTree(root, (n: any) => n.elementType == qamRenderer); // need elementType, because type is actually mobx wrapper
|
||||
const qamNode =
|
||||
root &&
|
||||
findInReactTree(
|
||||
root,
|
||||
(n: any) =>
|
||||
n.elementType == qamBrowserViewRenderer ||
|
||||
(qamEmbeddedRenderer != null && n.elementType == qamEmbeddedRenderer),
|
||||
); // need elementType, because type is actually mobx wrapper
|
||||
if (qamNode) {
|
||||
console.log('patching existing qam');
|
||||
// Only affects this fiber node so we don't need to unpatch here
|
||||
qamNode.type = qamNode.elementType.type;
|
||||
if (qamNode?.alternate) {
|
||||
@@ -71,7 +83,8 @@ class TabsHook extends Logger {
|
||||
}
|
||||
|
||||
deinit() {
|
||||
this.qamPatch?.unpatch();
|
||||
this.qamBrowserViewPatch?.unpatch();
|
||||
this.qamEmbeddedPatch?.unpatch();
|
||||
}
|
||||
|
||||
add(tab: Tab) {
|
||||
|
||||
Reference in New Issue
Block a user