summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/package.json2
-rw-r--r--frontend/pnpm-lock.yaml10
-rw-r--r--frontend/src/components/modals/filepicker/patches/library.ts2
-rw-r--r--frontend/src/plugin-loader.tsx7
-rw-r--r--frontend/src/router-hook.tsx10
5 files changed, 14 insertions, 17 deletions
diff --git a/frontend/package.json b/frontend/package.json
index 842ec869..5c16e017 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -47,7 +47,7 @@
}
},
"dependencies": {
- "@decky/ui": "^4.8.3",
+ "@decky/ui": "^4.10.2",
"compare-versions": "^6.1.1",
"filesize": "^10.1.2",
"i18next": "^23.11.5",
diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml
index 711af51f..d3685cba 100644
--- a/frontend/pnpm-lock.yaml
+++ b/frontend/pnpm-lock.yaml
@@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@decky/ui':
- specifier: ^4.8.3
- version: 4.8.3
+ specifier: ^4.10.2
+ version: 4.10.2
compare-versions:
specifier: ^6.1.1
version: 6.1.1
@@ -218,8 +218,8 @@ packages:
'@decky/api@1.1.1':
resolution: {integrity: sha512-R5fkBRHBt5QIQY7Q0AlbVIhlIZ/nTzwBOoi8Rt4Go2fjFnoMKPInCJl6cPjXzimGwl2pyqKJgY6VnH6ar0XrHQ==}
- '@decky/ui@4.8.3':
- resolution: {integrity: sha512-Y1KciazgvKqMEVBGrWFCTGOqgVi5sHbcQNoCZRMbPpcI0U3j7udl6mkfe/NBa16oRDZ03ljS41SmrAgKAAt/pA==}
+ '@decky/ui@4.10.2':
+ resolution: {integrity: sha512-dfY/OEI/rhG4d3Tvx4Y3TLmBrJ+nAm2RTbkoOJ3VAglql3Lu7RY2ixeDFbs21ZWWzWh/C+9dAQKjQ4lx4d1f2g==}
'@esbuild/aix-ppc64@0.20.2':
resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==}
@@ -2295,7 +2295,7 @@ snapshots:
'@decky/api@1.1.1': {}
- '@decky/ui@4.8.3': {}
+ '@decky/ui@4.10.2': {}
'@esbuild/aix-ppc64@0.20.2':
optional: true
diff --git a/frontend/src/components/modals/filepicker/patches/library.ts b/frontend/src/components/modals/filepicker/patches/library.ts
index 3b7fa679..b0930a5e 100644
--- a/frontend/src/components/modals/filepicker/patches/library.ts
+++ b/frontend/src/components/modals/filepicker/patches/library.ts
@@ -47,7 +47,7 @@ export default async function libraryPatch() {
}
const unlisten = History.listen(() => {
- if (window.SteamClient.Apps.PromptToChangeShortcut !== patch.patchedFunction) {
+ if ((window.SteamClient.Apps as any).PromptToChangeShortcut !== patch.patchedFunction) {
rePatch();
}
});
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index 88e85a48..df0a6956 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -1,5 +1,6 @@
import { ToastNotification } from '@decky/api';
import {
+ EUIMode,
ModalRoot,
Navigation,
PanelSection,
@@ -30,7 +31,7 @@ import { HiddenPluginsService } from './hidden-plugins-service';
import Logger from './logger';
import { NotificationService } from './notification-service';
import { InstallType, Plugin, PluginLoadType } from './plugin';
-import RouterHook, { UIMode } from './router-hook';
+import RouterHook from './router-hook';
import { deinitSteamFixes, initSteamFixes } from './steamfixes';
import { checkForPluginUpdates } from './store';
import TabsHook from './tabs-hook';
@@ -205,12 +206,12 @@ class PluginLoader extends Logger {
let registration: any;
const uiMode = await new Promise(
(r) =>
- (registration = SteamClient.UI.RegisterForUIModeChanged((mode: UIMode) => {
+ (registration = SteamClient.UI.RegisterForUIModeChanged((mode: EUIMode) => {
r(mode);
registration.unregister();
})),
);
- if (uiMode == UIMode.BigPicture) {
+ if (uiMode == EUIMode.GamePad) {
// wait for SP window to exist before loading plugins
while (!findSP()) {
await sleep(100);
diff --git a/frontend/src/router-hook.tsx b/frontend/src/router-hook.tsx
index 9612793a..b3355d76 100644
--- a/frontend/src/router-hook.tsx
+++ b/frontend/src/router-hook.tsx
@@ -1,4 +1,5 @@
import {
+ EUIMode,
ErrorBoundary,
Patch,
afterPatch,
@@ -31,11 +32,6 @@ declare global {
}
}
-export enum UIMode {
- BigPicture = 4,
- Desktop = 7,
-}
-
const isPatched = Symbol('is patched');
class RouterHook extends Logger {
@@ -76,13 +72,13 @@ class RouterHook extends Logger {
this.error('Failed to find router stack module');
}
- this.modeChangeRegistration = SteamClient.UI.RegisterForUIModeChanged((mode: UIMode) => {
+ this.modeChangeRegistration = SteamClient.UI.RegisterForUIModeChanged((mode: EUIMode) => {
this.debug(`UI mode changed to ${mode}`);
if (this.patchedModes.has(mode)) return;
this.patchedModes.add(mode);
this.debug(`Patching router for UI mode ${mode}`);
switch (mode) {
- case UIMode.BigPicture:
+ case EUIMode.GamePad:
this.debug('Patching gamepad router');
this.patchGamepadRouter();
break;