summaryrefslogtreecommitdiff
path: root/frontend/src/steamfixes
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/steamfixes')
-rw-r--r--frontend/src/steamfixes/index.ts2
-rw-r--r--frontend/src/steamfixes/reload.ts11
-rw-r--r--frontend/src/steamfixes/restart.ts7
3 files changed, 10 insertions, 10 deletions
diff --git a/frontend/src/steamfixes/index.ts b/frontend/src/steamfixes/index.ts
index 988f3bd7..fe0e3e05 100644
--- a/frontend/src/steamfixes/index.ts
+++ b/frontend/src/steamfixes/index.ts
@@ -7,6 +7,6 @@ export function deinitSteamFixes() {
}
export async function initSteamFixes() {
- fixes.push(reloadFix());
+ fixes.push(await reloadFix());
fixes.push(await restartFix());
}
diff --git a/frontend/src/steamfixes/reload.ts b/frontend/src/steamfixes/reload.ts
index e31f78fc..8635abdc 100644
--- a/frontend/src/steamfixes/reload.ts
+++ b/frontend/src/steamfixes/reload.ts
@@ -1,10 +1,17 @@
+import { getFocusNavController, sleep } from 'decky-frontend-lib';
+
import Logger from '../logger';
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
- if (window.FocusNavController?.m_rgAllContexts?.length == 0) {
+ await sleep(4000);
+ if (getFocusNavController()?.m_rgAllContexts?.length == 0) {
SteamClient.URL.ExecuteSteamURL('steam://open/settings');
logger.log('Applied UI reload fix.');
}
diff --git a/frontend/src/steamfixes/restart.ts b/frontend/src/steamfixes/restart.ts
index 467efd6a..93fc08f7 100644
--- a/frontend/src/steamfixes/restart.ts
+++ b/frontend/src/steamfixes/restart.ts
@@ -4,13 +4,6 @@ import Logger from '../logger';
const logger = new Logger('RestartSteamFix');
-declare global {
- interface Window {
- SteamClient: any;
- appDetailsStore: any;
- }
-}
-
let patch: Patch;
function rePatch() {