mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 20:51:57 +00:00
Fix loader on feb 22 2023 beta
This commit is contained in:
@@ -251,7 +251,7 @@ class Utilities:
|
|||||||
enumerable: true,
|
enumerable: true,
|
||||||
configurable: true,
|
configurable: true,
|
||||||
get: function() {
|
get: function() {
|
||||||
return FocusNavController?.m_ActiveContext?.ActiveWindow || window;
|
return (GamepadNavTree?.m_context?.m_controller || FocusNavController)?.m_ActiveContext?.ActiveWindow || window;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
""" + await res.text() + "\n}"
|
""" + await res.text() + "\n}"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"decky-frontend-lib": "^3.18.10",
|
"decky-frontend-lib": "^3.19.1",
|
||||||
"react-file-icon": "^1.2.0",
|
"react-file-icon": "^1.2.0",
|
||||||
"react-icons": "^4.4.0",
|
"react-icons": "^4.4.0",
|
||||||
"react-markdown": "^8.0.3",
|
"react-markdown": "^8.0.3",
|
||||||
|
|||||||
Generated
+4
-4
@@ -11,7 +11,7 @@ specifiers:
|
|||||||
'@types/react-file-icon': ^1.0.1
|
'@types/react-file-icon': ^1.0.1
|
||||||
'@types/react-router': 5.1.18
|
'@types/react-router': 5.1.18
|
||||||
'@types/webpack': ^5.28.0
|
'@types/webpack': ^5.28.0
|
||||||
decky-frontend-lib: ^3.18.10
|
decky-frontend-lib: ^3.19.1
|
||||||
husky: ^8.0.1
|
husky: ^8.0.1
|
||||||
import-sort-style-module: ^6.0.0
|
import-sort-style-module: ^6.0.0
|
||||||
inquirer: ^8.2.4
|
inquirer: ^8.2.4
|
||||||
@@ -31,7 +31,7 @@ specifiers:
|
|||||||
typescript: ^4.7.4
|
typescript: ^4.7.4
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
decky-frontend-lib: 3.18.10
|
decky-frontend-lib: 3.19.1
|
||||||
react-file-icon: 1.2.0_wcqkhtmu7mswc6yz4uyexck3ty
|
react-file-icon: 1.2.0_wcqkhtmu7mswc6yz4uyexck3ty
|
||||||
react-icons: 4.4.0_react@16.14.0
|
react-icons: 4.4.0_react@16.14.0
|
||||||
react-markdown: 8.0.3_vshvapmxg47tngu7tvrsqpq55u
|
react-markdown: 8.0.3_vshvapmxg47tngu7tvrsqpq55u
|
||||||
@@ -975,8 +975,8 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms: 2.1.2
|
ms: 2.1.2
|
||||||
|
|
||||||
/decky-frontend-lib/3.18.10:
|
/decky-frontend-lib/3.19.1:
|
||||||
resolution: {integrity: sha512-2mgbA3sSkuwQR/FnmhXVrcW6LyTS95IuL6muJAmQCruhBvXapDtjk1TcgxqMZxFZwGD1IPnemPYxHZll6IgnZw==}
|
resolution: {integrity: sha512-hU4+EFs74MGzUCv8l1AO2+EBj9RRbnpU19Crm4u+3lbLu6d63U2GsUeQ9ssmNRcOMY1OuVZkRoZBE58soOBJ3A==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/decode-named-character-reference/1.0.2:
|
/decode-named-character-reference/1.0.2:
|
||||||
|
|||||||
@@ -4,15 +4,11 @@ const QuickAccessVisibleState = createContext<boolean>(true);
|
|||||||
|
|
||||||
export const useQuickAccessVisible = () => useContext(QuickAccessVisibleState);
|
export const useQuickAccessVisible = () => useContext(QuickAccessVisibleState);
|
||||||
|
|
||||||
export const QuickAccessVisibleStateProvider: FC<{ initial: boolean; setter: ((val: boolean) => {}[]) | never[] }> = ({
|
export const QuickAccessVisibleStateProvider: FC<{ initial: boolean; tab: any }> = ({ children, initial, tab }) => {
|
||||||
children,
|
|
||||||
initial,
|
|
||||||
setter,
|
|
||||||
}) => {
|
|
||||||
const [visible, setVisible] = useState<boolean>(initial);
|
const [visible, setVisible] = useState<boolean>(initial);
|
||||||
const [prev, setPrev] = useState<boolean>(initial);
|
const [prev, setPrev] = useState<boolean>(initial);
|
||||||
// hack to use an array as a "pointer" to pass the setter up the tree
|
// HACK but i can't think of a better way to do this
|
||||||
setter[0] = setVisible;
|
tab.qAMVisibilitySetter = setVisible;
|
||||||
if (initial != prev) {
|
if (initial != prev) {
|
||||||
setPrev(initial);
|
setPrev(initial);
|
||||||
setVisible(initial);
|
setVisible(initial);
|
||||||
|
|||||||
@@ -4,13 +4,6 @@ import Logger from '../../../../logger';
|
|||||||
|
|
||||||
const logger = new Logger('LibraryPatch');
|
const logger = new Logger('LibraryPatch');
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
SteamClient: any;
|
|
||||||
appDetailsStore: any;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let patch: Patch;
|
let patch: Patch;
|
||||||
|
|
||||||
function rePatch() {
|
function rePatch() {
|
||||||
@@ -20,7 +13,9 @@ function rePatch() {
|
|||||||
const details = window.appDetailsStore.GetAppDetails(appid);
|
const details = window.appDetailsStore.GetAppDetails(appid);
|
||||||
logger.debug('game details', details);
|
logger.debug('game details', details);
|
||||||
// strShortcutStartDir
|
// strShortcutStartDir
|
||||||
const file = await window.DeckyPluginLoader.openFilePicker(details.strShortcutStartDir.replaceAll('"', ''));
|
const file = await window.DeckyPluginLoader.openFilePicker(
|
||||||
|
details?.strShortcutStartDir.replaceAll('"', '') || '/',
|
||||||
|
);
|
||||||
logger.debug('user selected', file);
|
logger.debug('user selected', file);
|
||||||
window.SteamClient.Apps.SetShortcutExe(appid, JSON.stringify(file.path));
|
window.SteamClient.Apps.SetShortcutExe(appid, JSON.stringify(file.path));
|
||||||
const pathArr = file.path.split('/');
|
const pathArr = file.path.split('/');
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default function DeveloperSettings() {
|
|||||||
>
|
>
|
||||||
<Toggle
|
<Toggle
|
||||||
value={reactDevtoolsEnabled}
|
value={reactDevtoolsEnabled}
|
||||||
disabled={reactDevtoolsIP == ''}
|
// disabled={reactDevtoolsIP == ''}
|
||||||
onChange={(toggleValue) => {
|
onChange={(toggleValue) => {
|
||||||
setReactDevtoolsEnabled(toggleValue);
|
setReactDevtoolsEnabled(toggleValue);
|
||||||
setShouldConnectToReactDevTools(toggleValue);
|
setShouldConnectToReactDevTools(toggleValue);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import Logger from '../../logger';
|
|||||||
import { StorePlugin, getPluginList } from '../../store';
|
import { StorePlugin, getPluginList } from '../../store';
|
||||||
import PluginCard from './PluginCard';
|
import PluginCard from './PluginCard';
|
||||||
|
|
||||||
const logger = new Logger('FilePicker');
|
const logger = new Logger('Store');
|
||||||
|
|
||||||
const StorePage: FC<{}> = () => {
|
const StorePage: FC<{}> = () => {
|
||||||
const [currentTabRoute, setCurrentTabRoute] = useState<string>('browse');
|
const [currentTabRoute, setCurrentTabRoute] = useState<string>('browse');
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ export function deinitSteamFixes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function initSteamFixes() {
|
export async function initSteamFixes() {
|
||||||
fixes.push(reloadFix());
|
fixes.push(await reloadFix());
|
||||||
fixes.push(await restartFix());
|
fixes.push(await restartFix());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
|
import { getFocusNavController, sleep } from 'decky-frontend-lib';
|
||||||
|
|
||||||
import Logger from '../logger';
|
import Logger from '../logger';
|
||||||
|
|
||||||
const logger = new Logger('ReloadSteamFix');
|
const logger = new Logger('ReloadSteamFix');
|
||||||
|
|
||||||
export default function reloadFix() {
|
declare global {
|
||||||
|
var GamepadNavTree: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function reloadFix() {
|
||||||
// Hack to unbreak the ui when reloading it
|
// Hack to unbreak the ui when reloading it
|
||||||
if (window.FocusNavController?.m_rgAllContexts?.length == 0) {
|
await sleep(4000);
|
||||||
|
if (getFocusNavController()?.m_rgAllContexts?.length == 0) {
|
||||||
SteamClient.URL.ExecuteSteamURL('steam://open/settings');
|
SteamClient.URL.ExecuteSteamURL('steam://open/settings');
|
||||||
logger.log('Applied UI reload fix.');
|
logger.log('Applied UI reload fix.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,6 @@ import Logger from '../logger';
|
|||||||
|
|
||||||
const logger = new Logger('RestartSteamFix');
|
const logger = new Logger('RestartSteamFix');
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
SteamClient: any;
|
|
||||||
appDetailsStore: any;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let patch: Patch;
|
let patch: Patch;
|
||||||
|
|
||||||
function rePatch() {
|
function rePatch() {
|
||||||
|
|||||||
@@ -128,22 +128,23 @@ class TabsHook extends Logger {
|
|||||||
let deckyTabAmount = existingTabs.reduce((prev: any, cur: any) => (cur.decky ? prev + 1 : prev), 0);
|
let deckyTabAmount = existingTabs.reduce((prev: any, cur: any) => (cur.decky ? prev + 1 : prev), 0);
|
||||||
if (deckyTabAmount == this.tabs.length) {
|
if (deckyTabAmount == this.tabs.length) {
|
||||||
for (let tab of existingTabs) {
|
for (let tab of existingTabs) {
|
||||||
if (tab?.decky) tab.panel.props.setter[0](visible);
|
if (tab?.decky && tab?.qAMVisibilitySetter) tab?.qAMVisibilitySetter(visible);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (const { title, icon, content, id } of this.tabs) {
|
for (const { title, icon, content, id } of this.tabs) {
|
||||||
existingTabs.push({
|
const tab: any = {
|
||||||
key: id,
|
key: id,
|
||||||
title,
|
title,
|
||||||
tab: icon,
|
tab: icon,
|
||||||
decky: true,
|
decky: true,
|
||||||
panel: (
|
};
|
||||||
<QuickAccessVisibleStateProvider initial={visible} setter={[]}>
|
tab.panel = (
|
||||||
{content}
|
<QuickAccessVisibleStateProvider initial={visible} tab={tab}>
|
||||||
</QuickAccessVisibleStateProvider>
|
{content}
|
||||||
),
|
</QuickAccessVisibleStateProvider>
|
||||||
});
|
);
|
||||||
|
existingTabs.push(tab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
import { getFocusNavController } from '../../../../lib/dist';
|
||||||
|
|
||||||
export function findSP(): Window {
|
export function findSP(): Window {
|
||||||
// old (SP as host)
|
// old (SP as host)
|
||||||
if (document.title == 'SP') return window;
|
if (document.title == 'SP') return window;
|
||||||
// new (SP as popup)
|
// new (SP as popup)
|
||||||
return FocusNavController.m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root
|
return getFocusNavController().m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root
|
||||||
.Element.ownerDocument.defaultView;
|
.Element.ownerDocument.defaultView;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"jsxFactory": "window.SP_REACT.createElement",
|
"jsxFactory": "window.SP_REACT.createElement",
|
||||||
"jsxFragmentFactory": "window.SP_REACT.Fragment",
|
"jsxFragmentFactory": "window.SP_REACT.Fragment",
|
||||||
|
|||||||
Reference in New Issue
Block a user