how did this ever happen

This commit is contained in:
AAGaming
2023-02-22 22:03:19 -05:00
parent 97bb3fa4c8
commit f9624a0859
2 changed files with 1 additions and 10 deletions
@@ -6,6 +6,7 @@ import {
Focusable,
ProgressBarWithInfo,
Spinner,
findSP,
showModal,
} from 'decky-frontend-lib';
import { useCallback } from 'react';
@@ -14,7 +15,6 @@ import { useEffect, useState } from 'react';
import { FaExclamation } from 'react-icons/fa';
import { VerInfo, callUpdaterMethod, finishUpdate } from '../../../../updater';
import { findSP } from '../../../../utils/windows';
import { useDeckyState } from '../../../DeckyState';
import InlinePatchNotes from '../../../patchnotes/InlinePatchNotes';
import WithSuspense from '../../../WithSuspense';
-9
View File
@@ -1,9 +0,0 @@
import { getFocusNavController } from '../../../../lib/dist';
export function findSP(): Window {
// old (SP as host)
if (document.title == 'SP') return window;
// new (SP as popup)
return getFocusNavController().m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root
.Element.ownerDocument.defaultView;
}